summaryrefslogtreecommitdiff
path: root/jstests/core/regex4.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/core/regex4.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/regex4.js')
-rw-r--r--jstests/core/regex4.js29
1 files changed, 16 insertions, 13 deletions
diff --git a/jstests/core/regex4.js b/jstests/core/regex4.js
index ed5e76331e0..112375e2e09 100644
--- a/jstests/core/regex4.js
+++ b/jstests/core/regex4.js
@@ -2,19 +2,22 @@
t = db.regex4;
t.drop();
-t.save( { name : "eliot" } );
-t.save( { name : "emily" } );
-t.save( { name : "bob" } );
-t.save( { name : "aaron" } );
+t.save({name: "eliot"});
+t.save({name: "emily"});
+t.save({name: "bob"});
+t.save({name: "aaron"});
-assert.eq( 2 , t.find( { name : /^e.*/ } ).count() , "no index count" );
-assert.eq( 4 , t.find( { name : /^e.*/ } ).explain(true).executionStats.totalDocsExamined ,
- "no index explain" );
-//assert.eq( 2 , t.find( { name : { $ne : /^e.*/ } } ).count() , "no index count ne" ); // SERVER-251
+assert.eq(2, t.find({name: /^e.*/}).count(), "no index count");
+assert.eq(4,
+ t.find({name: /^e.*/}).explain(true).executionStats.totalDocsExamined,
+ "no index explain");
+// assert.eq( 2 , t.find( { name : { $ne : /^e.*/ } } ).count() , "no index count ne" ); //
+// SERVER-251
-t.ensureIndex( { name : 1 } );
+t.ensureIndex({name: 1});
-assert.eq( 2 , t.find( { name : /^e.*/ } ).count() , "index count" );
-assert.eq( 2 , t.find( { name : /^e.*/ } ).explain(true).executionStats.totalKeysExamined ,
- "index explain" ); // SERVER-239
-//assert.eq( 2 , t.find( { name : { $ne : /^e.*/ } } ).count() , "index count ne" ); // SERVER-251
+assert.eq(2, t.find({name: /^e.*/}).count(), "index count");
+assert.eq(2,
+ t.find({name: /^e.*/}).explain(true).executionStats.totalKeysExamined,
+ "index explain"); // SERVER-239
+// assert.eq( 2 , t.find( { name : { $ne : /^e.*/ } } ).count() , "index count ne" ); // SERVER-251