diff options
Diffstat (limited to 'jstests/aggregation/bugs/server25590.js')
-rw-r--r-- | jstests/aggregation/bugs/server25590.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/jstests/aggregation/bugs/server25590.js b/jstests/aggregation/bugs/server25590.js index 329ae808a2c..b478f806029 100644 --- a/jstests/aggregation/bugs/server25590.js +++ b/jstests/aggregation/bugs/server25590.js @@ -1,19 +1,19 @@ // Test that an aggregate command where the "pipeline" field has the wrong type fails with a // TypeMismatch error. (function() { - "use strict"; +"use strict"; - const coll = db.server25590; - coll.drop(); +const coll = db.server25590; +coll.drop(); - assert.writeOK(coll.insert({})); +assert.writeOK(coll.insert({})); - assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: 1}), - ErrorCodes.TypeMismatch); - assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: {}}), - ErrorCodes.TypeMismatch); - assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: [1, 2]}), - ErrorCodes.TypeMismatch); - assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: [1, null]}), - ErrorCodes.TypeMismatch); +assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: 1}), + ErrorCodes.TypeMismatch); +assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: {}}), + ErrorCodes.TypeMismatch); +assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: [1, 2]}), + ErrorCodes.TypeMismatch); +assert.commandFailedWithCode(db.runCommand({aggregate: coll.getName(), pipeline: [1, null]}), + ErrorCodes.TypeMismatch); })(); |