summaryrefslogtreecommitdiff
path: root/jstests/gle/core/gle_example.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/gle/core/gle_example.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/gle/core/gle_example.js')
-rw-r--r--jstests/gle/core/gle_example.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/jstests/gle/core/gle_example.js b/jstests/gle/core/gle_example.js
index 8c6e481b5a7..6096f605217 100644
--- a/jstests/gle/core/gle_example.js
+++ b/jstests/gle/core/gle_example.js
@@ -5,13 +5,13 @@
var coll = db.getCollection("gle_example");
coll.drop();
-coll.insert({ hello : "world" });
-assert.eq( null, coll.getDB().getLastError() );
+coll.insert({hello: "world"});
+assert.eq(null, coll.getDB().getLastError());
// Error on insert.
coll.drop();
-coll.insert({ _id: 1 });
-coll.insert({ _id: 1 });
+coll.insert({_id: 1});
+coll.insert({_id: 1});
var gle = db.getLastErrorObj();
assert.neq(null, gle.err);
@@ -22,8 +22,7 @@ assert.eq(null, gle.err);
// Error on upsert.
coll.drop();
-coll.insert({ _id: 1 });
-coll.update({ y: 1 }, { _id: 1 }, true);
+coll.insert({_id: 1});
+coll.update({y: 1}, {_id: 1}, true);
gle = db.getLastErrorObj();
assert.neq(null, gle.err);
-