summaryrefslogtreecommitdiff
path: root/jstests/core/geo_s2nearcorrect.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/geo_s2nearcorrect.js')
-rw-r--r--jstests/core/geo_s2nearcorrect.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/jstests/core/geo_s2nearcorrect.js b/jstests/core/geo_s2nearcorrect.js
index 9fdeb4aa6a3..54552a4bee5 100644
--- a/jstests/core/geo_s2nearcorrect.js
+++ b/jstests/core/geo_s2nearcorrect.js
@@ -5,8 +5,14 @@
t = db.geo_s2nearcorrect;
t.drop();
-longline = { "type" : "LineString", "coordinates": [ [0,0], [179, 89]]};
+longline = {
+ "type": "LineString",
+ "coordinates": [[0, 0], [179, 89]]
+};
t.insert({geo: longline});
t.ensureIndex({geo: "2dsphere"});
-origin = { "type" : "Point", "coordinates": [ 45, 45] };
-assert.eq(1, t.find({ "geo" : { "$near" : { "$geometry" : origin, $maxDistance: 20000000} } }).count());
+origin = {
+ "type": "Point",
+ "coordinates": [45, 45]
+};
+assert.eq(1, t.find({"geo": {"$near": {"$geometry": origin, $maxDistance: 20000000}}}).count());