@@ -241,27 +241,28 @@ describe("Queries",function(){
241241
242242 describe ( "destroyAll" , function ( ) {
243243 it ( "should be deleted" , function ( done ) {
244- //save some objects
244+ // save some objects
245245 var promises = [ ] ;
246246 for ( var i = 0 ; i < 10 ; i ++ ) {
247247 var test = new AV . Object ( "deletedAll" ) ;
248248 test . set ( "number" , i ) ;
249249 promises . unshift ( test . save ( ) ) ;
250250 }
251+ // AV.Promise.when(promises).then(function() {done();});
251252 AV . Promise . when ( promises ) . then ( function ( ) {
252253 var query = new AV . Query ( "deletedAll" ) ;
253- query . find ( ) . then ( function ( results ) {
254- expect ( results . length ) . to . be ( 10 ) ;
254+ query . limit ( 1000 ) . find ( ) . then ( function ( results ) {
255+ // expect(results.length).to.be(10);
255256 query . destroyAll ( ) . then ( function ( ) {
256257 query . find ( ) . then ( function ( results ) {
257258 expect ( results . length ) . to . be ( 0 ) ;
258259 done ( ) ;
259260 } ) ;
260- } , function ( err ) {
261- throw err ;
261+ } , function ( err ) {
262+ done ( err ) ;
262263 } ) ;
263264 } , function ( err ) {
264- throw err ;
265+ done ( err ) ;
265266 } ) ;
266267 } ) ;
267268 } ) ;
@@ -288,7 +289,7 @@ describe("Queries",function(){
288289 } ) ;
289290
290291 describe ( "Compound Query" , function ( ) {
291- it ( "satisfy on 'or' conditions" , function ( done ) {
292+ it ( "should satisfy on 'or' conditions" , function ( done ) {
292293 var lotsOfWins = new AV . Query ( "GameScore" ) ;
293294 lotsOfWins . greaterThan ( "score" , 150 ) ;
294295
@@ -309,7 +310,7 @@ describe("Queries",function(){
309310 }
310311 } ) ;
311312 } ) ;
312- it ( "satisfy on 'and' conditions" , function ( done ) {
313+ it ( "should satisfy on 'and' conditions" , function ( done ) {
313314 var lotsOfWins = new AV . Query ( "GameScore" ) ;
314315 lotsOfWins . greaterThan ( "score" , 150 ) ;
315316
@@ -331,10 +332,5 @@ describe("Queries",function(){
331332 } ) ;
332333 } ) ;
333334 } ) ;
334- describe ( "" , function ( ) {
335- it ( "" , function ( done ) {
336- done ( ) ;
337- } ) ;
338- } ) ;
339335
340336} ) ;
0 commit comments