diff options
Diffstat (limited to 'jstests/core/list_indexes.js')
-rw-r--r-- | jstests/core/list_indexes.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/jstests/core/list_indexes.js b/jstests/core/list_indexes.js index db3f895bc20..520406be59f 100644 --- a/jstests/core/list_indexes.js +++ b/jstests/core/list_indexes.js @@ -1,6 +1,6 @@ // Basic functional tests for the listIndexes command. -(function () { +(function() { "use strict"; var coll = db.list_indexes1; @@ -27,17 +27,20 @@ // var getListIndexesCursor = function(coll, options, subsequentBatchSize) { - return new DBCommandCursor(coll.getDB().getMongo(), - coll.runCommand("listIndexes", options), - subsequentBatchSize); + return new DBCommandCursor( + coll.getDB().getMongo(), coll.runCommand("listIndexes", options), subsequentBatchSize); }; var cursorGetIndexSpecs = function(cursor) { - return cursor.toArray().sort(function(a, b) { return a.name > b.name; }); + return cursor.toArray().sort(function(a, b) { + return a.name > b.name; + }); }; var cursorGetIndexNames = function(cursor) { - return cursorGetIndexSpecs(cursor).map(function(spec) { return spec.name; }); + return cursorGetIndexSpecs(cursor).map(function(spec) { + return spec.name; + }); }; coll.drop(); @@ -162,7 +165,9 @@ res = coll.runCommand("listIndexes", {cursor: {batchSize: 0}}); cursor = new DBCommandCursor(coll.getDB().getMongo(), res, 2); cursor = null; - gc(); // Shell will send a killCursors message when cleaning up underlying cursor. + gc(); // Shell will send a killCursors message when cleaning up underlying cursor. cursor = new DBCommandCursor(coll.getDB().getMongo(), res, 2); - assert.throws(function() { cursor.hasNext(); }); + assert.throws(function() { + cursor.hasNext(); + }); }()); |