summaryrefslogtreecommitdiff
path: root/jstests/core/dropdb.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/dropdb.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/dropdb.js')
-rw-r--r--jstests/core/dropdb.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/jstests/core/dropdb.js b/jstests/core/dropdb.js
index afe783338c4..1af56da34bf 100644
--- a/jstests/core/dropdb.js
+++ b/jstests/core/dropdb.js
@@ -4,18 +4,19 @@
m = db.getMongo();
baseName = "jstests_dropdb";
-ddb = db.getSisterDB( baseName );
+ddb = db.getSisterDB(baseName);
print("initial dbs: " + tojson(m.getDBNames()));
function check(shouldExist) {
var dbs = m.getDBNames();
- assert.eq(Array.contains(dbs, baseName), shouldExist,
- "DB " + baseName + " should " + (shouldExist ? "" : "not ") + "exist."
- + " dbs: " + tojson(dbs) + "\n" + tojson( m.getDBs() ) );
+ assert.eq(Array.contains(dbs, baseName),
+ shouldExist,
+ "DB " + baseName + " should " + (shouldExist ? "" : "not ") + "exist." + " dbs: " +
+ tojson(dbs) + "\n" + tojson(m.getDBs()));
}
-ddb.c.save( {} );
+ddb.c.save({});
check(true);
var res = ddb.dropDatabase();
@@ -25,6 +26,7 @@ check(false);
var res = ddb.dropDatabase();
assert.commandWorked(res);
-assert.eq(res.dropped, undefined,
+assert.eq(res.dropped,
+ undefined,
"dropped field was populated even though nothing should have been dropped");
check(false);