summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/capped4.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:17:50 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:18:14 -0500
commit4ae691e8edc87d0e3cfb633bb91c328426be007b (patch)
tree52079a593f54382ca13a2e741633eab1b6271893 /jstests/noPassthroughWithMongod/capped4.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/noPassthroughWithMongod/capped4.js')
-rw-r--r--jstests/noPassthroughWithMongod/capped4.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/jstests/noPassthroughWithMongod/capped4.js b/jstests/noPassthroughWithMongod/capped4.js
index f1371e8fa00..039f2557866 100644
--- a/jstests/noPassthroughWithMongod/capped4.js
+++ b/jstests/noPassthroughWithMongod/capped4.js
@@ -1,28 +1,28 @@
t = db.jstests_capped4;
t.drop();
-db.createCollection( "jstests_capped4", {size:1000,capped:true} );
-t.ensureIndex( { i: 1 } );
-for( i = 0; i < 20; ++i ) {
- t.save( { i : i } );
+db.createCollection("jstests_capped4", {size: 1000, capped: true});
+t.ensureIndex({i: 1});
+for (i = 0; i < 20; ++i) {
+ t.save({i: i});
}
-c = t.find().sort( { $natural: -1 } ).limit( 2 );
+c = t.find().sort({$natural: -1}).limit(2);
c.next();
c.next();
-d = t.find().sort( { i: -1 } ).limit( 2 );
+d = t.find().sort({i: -1}).limit(2);
d.next();
d.next();
-for( i = 20; t.findOne( { i:19 } ); ++i ) {
- t.save( { i : i } );
+for (i = 20; t.findOne({i: 19}); ++i) {
+ t.save({i: i});
}
-//assert( !t.findOne( { i : 19 } ), "A" );
-assert( !c.hasNext(), "B" );
-assert( !d.hasNext(), "C" );
-assert( t.find().sort( { i : 1 } ).hint( { i : 1 } ).toArray().length > 10, "D" );
+// assert( !t.findOne( { i : 19 } ), "A" );
+assert(!c.hasNext(), "B");
+assert(!d.hasNext(), "C");
+assert(t.find().sort({i: 1}).hint({i: 1}).toArray().length > 10, "D");
-assert( t.findOne( { i : i - 1 } ), "E" );
-var res = assert.writeError(t.remove( { i : i - 1 } ));
-assert( res.getWriteError().errmsg.indexOf( "capped" ) >= 0, "F" );
+assert(t.findOne({i: i - 1}), "E");
+var res = assert.writeError(t.remove({i: i - 1}));
+assert(res.getWriteError().errmsg.indexOf("capped") >= 0, "F");
-assert( t.validate().valid, "G" );
+assert(t.validate().valid, "G");