summaryrefslogtreecommitdiff
path: root/jstests/core/explain_distinct.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/explain_distinct.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/explain_distinct.js')
-rw-r--r--jstests/core/explain_distinct.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/jstests/core/explain_distinct.js b/jstests/core/explain_distinct.js
index ad359016530..37d5a485516 100644
--- a/jstests/core/explain_distinct.js
+++ b/jstests/core/explain_distinct.js
@@ -19,10 +19,7 @@
distinctCmd.query = query;
}
- return coll.runCommand({
- explain: distinctCmd,
- verbosity: 'executionStats'
- });
+ return coll.runCommand({explain: distinctCmd, verbosity: 'executionStats'});
}
coll.drop();
@@ -33,16 +30,16 @@
assert(planHasStage(explain.queryPlanner.winningPlan, "EOF"));
// Insert the data to perform distinct() on.
- for (var i = 0; i < 10; i ++) {
+ for (var i = 0; i < 10; i++) {
assert.writeOK(coll.insert({a: 1, b: 1}));
assert.writeOK(coll.insert({a: 2, c: 1}));
}
- assert.commandFailed(runDistinctExplain(coll, {}, {})); // Bad keyString.
- assert.commandFailed(runDistinctExplain(coll, 'a', 'a')); // Bad query.
- assert.commandFailed(runDistinctExplain(coll, 'b', {$not: 1})); // Bad query.
- assert.commandFailed(runDistinctExplain(coll, 'a', {$not: 1})); // Bad query.
- assert.commandFailed(runDistinctExplain(coll, '_id', {$not: 1})); // Bad query.
+ assert.commandFailed(runDistinctExplain(coll, {}, {})); // Bad keyString.
+ assert.commandFailed(runDistinctExplain(coll, 'a', 'a')); // Bad query.
+ assert.commandFailed(runDistinctExplain(coll, 'b', {$not: 1})); // Bad query.
+ assert.commandFailed(runDistinctExplain(coll, 'a', {$not: 1})); // Bad query.
+ assert.commandFailed(runDistinctExplain(coll, '_id', {$not: 1})); // Bad query.
// Ensure that server accepts a distinct command with no 'query' field.
assert.commandWorked(runDistinctExplain(coll, '', null));