summaryrefslogtreecommitdiff
path: root/jstests/core/regex7.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/regex7.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/regex7.js')
-rw-r--r--jstests/core/regex7.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/jstests/core/regex7.js b/jstests/core/regex7.js
index 8f32ed603ad..90949ec3723 100644
--- a/jstests/core/regex7.js
+++ b/jstests/core/regex7.js
@@ -1,26 +1,26 @@
t = db.regex_matches_self;
t.drop();
-t.insert({r:/^a/});
-t.insert({r:/^a/i});
-t.insert({r:/^b/});
+t.insert({r: /^a/});
+t.insert({r: /^a/i});
+t.insert({r: /^b/});
// no index
-assert.eq( /^a/, t.findOne({r:/^a/}).r, '1 1 a');
-assert.eq( 1, t.count({r:/^a/}), '1 2');
-assert.eq( /^a/i, t.findOne({r:/^a/i}).r, '2 1 a');
-assert.eq( 1, t.count({r:/^a/i}), '2 2 a');
-assert.eq( /^b/, t.findOne({r:/^b/}).r, '3 1 a');
-assert.eq( 1, t.count({r:/^b/}), '3 2 a');
+assert.eq(/^a/, t.findOne({r: /^a/}).r, '1 1 a');
+assert.eq(1, t.count({r: /^a/}), '1 2');
+assert.eq(/^a/i, t.findOne({r: /^a/i}).r, '2 1 a');
+assert.eq(1, t.count({r: /^a/i}), '2 2 a');
+assert.eq(/^b/, t.findOne({r: /^b/}).r, '3 1 a');
+assert.eq(1, t.count({r: /^b/}), '3 2 a');
// with index
-t.ensureIndex({r:1});
-assert.eq( /^a/, t.findOne({r:/^a/}).r, '1 1 b');
-assert.eq( 1, t.count({r:/^a/}), '1 2 b');
-assert.eq( /^a/i, t.findOne({r:/^a/i}).r, '2 1 b');
-assert.eq( 1, t.count({r:/^a/i}), '2 2 b');
-assert.eq( /^b/, t.findOne({r:/^b/}).r, '3 1 b');
-assert.eq( 1, t.count({r:/^b/}), '3 2 b');
+t.ensureIndex({r: 1});
+assert.eq(/^a/, t.findOne({r: /^a/}).r, '1 1 b');
+assert.eq(1, t.count({r: /^a/}), '1 2 b');
+assert.eq(/^a/i, t.findOne({r: /^a/i}).r, '2 1 b');
+assert.eq(1, t.count({r: /^a/i}), '2 2 b');
+assert.eq(/^b/, t.findOne({r: /^b/}).r, '3 1 b');
+assert.eq(1, t.count({r: /^b/}), '3 2 b');
-t.insert( {r:"a"} );
-assert.eq( 2, t.count({r:/^a/}), 'c' ); \ No newline at end of file
+t.insert({r: "a"});
+assert.eq(2, t.count({r: /^a/}), 'c'); \ No newline at end of file