@@ -121,15 +121,15 @@ describe('transformWhere', () => {
121
121
describe ( 'mongoObjectToParseObject' , ( ) => {
122
122
it ( 'built-in timestamps' , ( done ) => {
123
123
var input = { createdAt : new Date ( ) , updatedAt : new Date ( ) } ;
124
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , { fields : { } } ) ;
124
+ var output = transform . mongoObjectToParseObject ( null , input , { fields : { } } ) ;
125
125
expect ( typeof output . createdAt ) . toEqual ( 'string' ) ;
126
126
expect ( typeof output . updatedAt ) . toEqual ( 'string' ) ;
127
127
done ( ) ;
128
128
} ) ;
129
129
130
130
it ( 'pointer' , ( done ) => {
131
131
var input = { _p_userPointer : '_User$123' } ;
132
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
132
+ var output = transform . mongoObjectToParseObject ( null , input , {
133
133
fields : { userPointer : { type : 'Pointer' , targetClass : '_User' } } ,
134
134
} ) ;
135
135
expect ( typeof output . userPointer ) . toEqual ( 'object' ) ;
@@ -141,7 +141,7 @@ describe('mongoObjectToParseObject', () => {
141
141
142
142
it ( 'null pointer' , ( done ) => {
143
143
var input = { _p_userPointer : null } ;
144
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
144
+ var output = transform . mongoObjectToParseObject ( null , input , {
145
145
fields : { userPointer : { type : 'Pointer' , targetClass : '_User' } } ,
146
146
} ) ;
147
147
expect ( output . userPointer ) . toBeUndefined ( ) ;
@@ -150,7 +150,7 @@ describe('mongoObjectToParseObject', () => {
150
150
151
151
it ( 'file' , ( done ) => {
152
152
var input = { picture : 'pic.jpg' } ;
153
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
153
+ var output = transform . mongoObjectToParseObject ( null , input , {
154
154
fields : { picture : { type : 'File' } } ,
155
155
} ) ;
156
156
expect ( typeof output . picture ) . toEqual ( 'object' ) ;
@@ -160,7 +160,7 @@ describe('mongoObjectToParseObject', () => {
160
160
161
161
it ( 'geopoint' , ( done ) => {
162
162
var input = { location : [ 180 , - 180 ] } ;
163
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
163
+ var output = transform . mongoObjectToParseObject ( null , input , {
164
164
fields : { location : { type : 'GeoPoint' } } ,
165
165
} ) ;
166
166
expect ( typeof output . location ) . toEqual ( 'object' ) ;
@@ -172,7 +172,7 @@ describe('mongoObjectToParseObject', () => {
172
172
173
173
it ( 'nested array' , ( done ) => {
174
174
var input = { arr : [ { _testKey : 'testValue' } ] } ;
175
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
175
+ var output = transform . mongoObjectToParseObject ( null , input , {
176
176
fields : { arr : { type : 'Array' } } ,
177
177
} ) ;
178
178
expect ( Array . isArray ( output . arr ) ) . toEqual ( true ) ;
@@ -192,7 +192,7 @@ describe('mongoObjectToParseObject', () => {
192
192
} ,
193
193
regularKey : "some data" ,
194
194
} ] }
195
- let output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
195
+ let output = transform . mongoObjectToParseObject ( null , input , {
196
196
fields : { array : { type : 'Array' } } ,
197
197
} ) ;
198
198
expect ( dd ( output , input ) ) . toEqual ( undefined ) ;
@@ -262,7 +262,7 @@ describe('transform schema key changes', () => {
262
262
_rperm : [ "*" ] ,
263
263
_wperm : [ "Kevin" ]
264
264
} ;
265
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , { fields : { } } ) ;
265
+ var output = transform . mongoObjectToParseObject ( null , input , { fields : { } } ) ;
266
266
expect ( typeof output . ACL ) . toEqual ( 'object' ) ;
267
267
expect ( output . _rperm ) . toBeUndefined ( ) ;
268
268
expect ( output . _wperm ) . toBeUndefined ( ) ;
@@ -276,7 +276,7 @@ describe('transform schema key changes', () => {
276
276
long : mongodb . Long . fromNumber ( Number . MAX_SAFE_INTEGER ) ,
277
277
double : new mongodb . Double ( Number . MAX_VALUE )
278
278
}
279
- var output = transform . mongoObjectToParseObject ( dummySchema , null , input , {
279
+ var output = transform . mongoObjectToParseObject ( null , input , {
280
280
fields : {
281
281
long : { type : 'Number' } ,
282
282
double : { type : 'Number' } ,
0 commit comments