@@ -275,32 +275,26 @@ describe('Parse.Query testing', () => {
275
275
} ) ;
276
276
} ) ;
277
277
278
- it ( 'query with limit equal to maxlimit' , function ( done ) {
278
+ it ( 'query with limit equal to maxlimit' , async ( ) => {
279
279
const baz = new TestObject ( { foo : 'baz' } ) ;
280
280
const qux = new TestObject ( { foo : 'qux' } ) ;
281
- reconfigureServer ( { maxLimit : 1 } ) ;
282
- Parse . Object . saveAll ( [ baz , qux ] ) . then ( function ( ) {
283
- const query = new Parse . Query ( TestObject ) ;
284
- query . limit ( 1 ) ;
285
- query . find ( ) . then ( function ( results ) {
286
- equal ( results . length , 1 ) ;
287
- done ( ) ;
288
- } ) ;
289
- } ) ;
281
+ await reconfigureServer ( { maxLimit : 1 } ) ;
282
+ await Parse . Object . saveAll ( [ baz , qux ] ) ;
283
+ const query = new Parse . Query ( TestObject ) ;
284
+ query . limit ( 1 ) ;
285
+ const results = await query . find ( ) ;
286
+ equal ( results . length , 1 ) ;
290
287
} ) ;
291
288
292
- it ( 'query with limit exceeding maxlimit' , function ( done ) {
289
+ it ( 'query with limit exceeding maxlimit' , async ( ) => {
293
290
const baz = new TestObject ( { foo : 'baz' } ) ;
294
291
const qux = new TestObject ( { foo : 'qux' } ) ;
295
- reconfigureServer ( { maxLimit : 1 } ) ;
296
- Parse . Object . saveAll ( [ baz , qux ] ) . then ( function ( ) {
297
- const query = new Parse . Query ( TestObject ) ;
298
- query . limit ( 2 ) ;
299
- query . find ( ) . then ( function ( results ) {
300
- equal ( results . length , 1 ) ;
301
- done ( ) ;
302
- } ) ;
303
- } ) ;
292
+ await reconfigureServer ( { maxLimit : 1 } ) ;
293
+ await Parse . Object . saveAll ( [ baz , qux ] ) ;
294
+ const query = new Parse . Query ( TestObject ) ;
295
+ query . limit ( 2 ) ;
296
+ const results = await query . find ( ) ;
297
+ equal ( results . length , 1 ) ;
304
298
} ) ;
305
299
306
300
it ( 'containedIn object array queries' , function ( done ) {
0 commit comments