diff options
Diffstat (limited to 'jstests/core/geonear_cmd_input_validation.js')
-rw-r--r-- | jstests/core/geonear_cmd_input_validation.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/jstests/core/geonear_cmd_input_validation.js b/jstests/core/geonear_cmd_input_validation.js index ad3d56d240a..f9cfaa4ff21 100644 --- a/jstests/core/geonear_cmd_input_validation.js +++ b/jstests/core/geonear_cmd_input_validation.js @@ -24,11 +24,7 @@ indexTypes.forEach(function(indexType) { pointDescription = (isLegacy ? "legacy coordinates" : "GeoJSON point"); function makeCommand(distance) { - var command = { - geoNear: t.getName(), - near: pointType, - spherical: spherical - }; + var command = {geoNear: t.getName(), near: pointType, spherical: spherical}; command[optionName] = distance; return command; } @@ -59,16 +55,14 @@ indexTypes.forEach(function(indexType) { } // Try several bad values for min/maxDistance. - badNumbers.concat(outOfRangeDistances) - .forEach(function(badDistance) { + badNumbers.concat(outOfRangeDistances).forEach(function(badDistance) { - var msg = - ("geoNear with spherical=" + spherical + " and " + pointDescription + - " and " + indexType + " index should've failed with " + optionName + - " " + badDistance); + var msg = ("geoNear with spherical=" + spherical + " and " + pointDescription + + " and " + indexType + " index should've failed with " + optionName + + " " + badDistance); - assert.commandFailed(db.runCommand(makeCommand(badDistance)), msg); - }); + assert.commandFailed(db.runCommand(makeCommand(badDistance)), msg); + }); // Bad values for limit / num. ['num', 'limit'].forEach(function(limitOptionName) { |