@@ -61,6 +61,29 @@ describe('transformCreate', () => {
6161 // This just checks that it doesn't crash, but it should check format.
6262 done ( ) ;
6363 } ) ;
64+
65+ describe ( 'GeoPoints' , ( ) => {
66+ it ( 'plain' , ( done ) => {
67+ var geoPoint = { __type : 'GeoPoint' , longitude : 180 , latitude : - 180 } ;
68+ var out = transform . transformCreate ( dummySchema , null , { location : geoPoint } ) ;
69+ expect ( out . location ) . toEqual ( [ 180 , - 180 ] ) ;
70+ done ( ) ;
71+ } ) ;
72+
73+ it ( 'in array' , ( done ) => {
74+ var geoPoint = { __type : 'GeoPoint' , longitude : 180 , latitude : - 180 } ;
75+ var out = transform . transformCreate ( dummySchema , null , { locations : [ geoPoint , geoPoint ] } ) ;
76+ expect ( out . locations ) . toEqual ( [ geoPoint , geoPoint ] ) ;
77+ done ( ) ;
78+ } ) ;
79+
80+ it ( 'in sub-object' , ( done ) => {
81+ var geoPoint = { __type : 'GeoPoint' , longitude : 180 , latitude : - 180 } ;
82+ var out = transform . transformCreate ( dummySchema , null , { locations : { start : geoPoint } } ) ;
83+ expect ( out ) . toEqual ( { locations : { start : geoPoint } } ) ;
84+ done ( ) ;
85+ } ) ;
86+ } ) ;
6487} ) ;
6588
6689describe ( 'transformWhere' , ( ) => {
0 commit comments