diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:17:50 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:18:14 -0500 |
commit | 4ae691e8edc87d0e3cfb633bb91c328426be007b (patch) | |
tree | 52079a593f54382ca13a2e741633eab1b6271893 /jstests/core/dbcase.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/dbcase.js')
-rw-r--r-- | jstests/core/dbcase.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/jstests/core/dbcase.js b/jstests/core/dbcase.js index 5663046443f..033608a3f6a 100644 --- a/jstests/core/dbcase.js +++ b/jstests/core/dbcase.js @@ -1,26 +1,26 @@ // Check db name duplication constraint SERVER-2111 -a = db.getSisterDB( "dbcasetest_dbnamea" ); -b = db.getSisterDB( "dbcasetest_dbnameA" ); +a = db.getSisterDB("dbcasetest_dbnamea"); +b = db.getSisterDB("dbcasetest_dbnameA"); a.dropDatabase(); b.dropDatabase(); -assert.writeOK( a.foo.save( { x : 1 } )); +assert.writeOK(a.foo.save({x: 1})); -res = b.foo.save( { x : 1 } ); -assert.writeError( res ); +res = b.foo.save({x: 1}); +assert.writeError(res); -assert.neq( -1, db.getMongo().getDBNames().indexOf( a.getName() ) ); -assert.eq( -1, db.getMongo().getDBNames().indexOf( b.getName() ) ); -printjson( db.getMongo().getDBs().databases ); +assert.neq(-1, db.getMongo().getDBNames().indexOf(a.getName())); +assert.eq(-1, db.getMongo().getDBNames().indexOf(b.getName())); +printjson(db.getMongo().getDBs().databases); a.dropDatabase(); b.dropDatabase(); -ai = db.getMongo().getDBNames().indexOf( a.getName() ); -bi = db.getMongo().getDBNames().indexOf( b.getName() ); +ai = db.getMongo().getDBNames().indexOf(a.getName()); +bi = db.getMongo().getDBNames().indexOf(b.getName()); // One of these dbs may exist if there is a slave active, but they must // not both exist. -assert( ai == -1 || bi == -1 ); -printjson( db.getMongo().getDBs().databases ); +assert(ai == -1 || bi == -1); +printjson(db.getMongo().getDBs().databases); |