diff options
Diffstat (limited to 'jstests/core/where2.js')
-rw-r--r-- | jstests/core/where2.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/core/where2.js b/jstests/core/where2.js index 9262b3076b3..8b4314beb88 100644 --- a/jstests/core/where2.js +++ b/jstests/core/where2.js @@ -1,10 +1,10 @@ -t = db.getCollection( "where2" ); +t = db.getCollection("where2"); t.drop(); -t.save( { a : 1 } ); -t.save( { a : 2 } ); -t.save( { a : 3 } ); +t.save({a: 1}); +t.save({a: 2}); +t.save({a: 3}); -assert.eq( 1 , t.find( { $where : "this.a == 2" } ).toArray().length , "A" ); -assert.eq( 1 , t.find( { $where : "\nthis.a == 2" } ).toArray().length , "B" ); +assert.eq(1, t.find({$where: "this.a == 2"}).toArray().length, "A"); +assert.eq(1, t.find({$where: "\nthis.a == 2"}).toArray().length, "B"); |