summaryrefslogtreecommitdiff
path: root/jstests/core/geo_multinest0.js
diff options
context:
space:
mode:
authorMike Grundy <michael.grundy@10gen.com>2016-02-04 12:29:01 -0500
committerMike Grundy <michael.grundy@10gen.com>2016-02-09 13:41:02 -0500
commit3bed8596d18275d1561e4f44f1f0bd72c1e038f1 (patch)
tree788eaed3c7a692a424f080d16a8841dc8afa3c13 /jstests/core/geo_multinest0.js
parent985e2a0be95709ac064c57f0a9bb385a55937285 (diff)
downloadmongo-3bed8596d18275d1561e4f44f1f0bd72c1e038f1.tar.gz
SERVER-22341 fix jslint errors in jstests/core with eslint --fix
Conflicts: jstests/core/count_hint.js
Diffstat (limited to 'jstests/core/geo_multinest0.js')
-rw-r--r--jstests/core/geo_multinest0.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/jstests/core/geo_multinest0.js b/jstests/core/geo_multinest0.js
index 7cde4f87280..c3f6fa5c29e 100644
--- a/jstests/core/geo_multinest0.js
+++ b/jstests/core/geo_multinest0.js
@@ -1,18 +1,18 @@
// Make sure nesting of location arrays also works.
-t = db.geonest
+t = db.geonest;
t.drop();
t.insert( { zip : "10001", data : [ { loc : [ 10, 10 ], type : "home" },
- { loc : [ 50, 50 ], type : "work" } ] } )
+ { loc : [ 50, 50 ], type : "work" } ] } );
t.insert( { zip : "10002", data : [ { loc : [ 20, 20 ], type : "home" },
- { loc : [ 50, 50 ], type : "work" } ] } )
+ { loc : [ 50, 50 ], type : "work" } ] } );
var res = t.insert( { zip : "10003", data : [ { loc : [ 30, 30 ], type : "home" },
{ loc : [ 50, 50 ], type : "work" } ] } );
assert.writeOK( res );
assert.commandWorked(t.ensureIndex( { "data.loc" : "2d", zip : 1 } ));
-assert.eq( 2, t.getIndexKeys().length )
+assert.eq( 2, t.getIndexKeys().length );
res = t.insert( { zip : "10004", data : [ { loc : [ 40, 40 ], type : "home" },
{ loc : [ 50, 50 ], type : "work" } ] } );
@@ -20,7 +20,7 @@ assert.writeOK( res );
// test normal access
-printjson( t.find( { "data.loc" : { $within : { $box : [ [ 0, 0 ], [ 45, 45 ] ] } } } ).toArray() )
+printjson( t.find( { "data.loc" : { $within : { $box : [ [ 0, 0 ], [ 45, 45 ] ] } } } ).toArray() );
assert.eq( 4, t.find( { "data.loc" : { $within : { $box : [ [ 0, 0 ], [ 45, 45 ] ] } } } ).count() );
@@ -32,17 +32,17 @@ assert.eq( 4, t.find( { "data.loc" : { $within : { $box : [ [ 45, 45 ], [ 50, 50
// Try a complex nesting
-t = db.geonest
+t = db.geonest;
t.drop();
-t.insert( { zip : "10001", data : [ { loc : [ [ 10, 10 ], { lat : 50, long : 50 } ], type : "home" } ] } )
+t.insert( { zip : "10001", data : [ { loc : [ [ 10, 10 ], { lat : 50, long : 50 } ], type : "home" } ] } );
t.insert( { zip : "10002", data : [ { loc : [ 20, 20 ], type : "home" },
- { loc : [ 50, 50 ], type : "work" } ] } )
+ { loc : [ 50, 50 ], type : "work" } ] } );
res = t.insert({ zip: "10003", data: [{ loc: [{ x: 30, y: 30 }, [ 50, 50 ]], type: "home" }]});
assert( !res.hasWriteError() );
assert.commandWorked(t.ensureIndex( { "data.loc" : "2d", zip : 1 } ));
-assert.eq( 2, t.getIndexKeys().length )
+assert.eq( 2, t.getIndexKeys().length );
res = t.insert( { zip : "10004", data : [ { loc : [ 40, 40 ], type : "home" },
{ loc : [ 50, 50 ], type : "work" } ] } );
@@ -50,7 +50,7 @@ res = t.insert( { zip : "10004", data : [ { loc : [ 40, 40 ], type : "home" },
assert.writeOK( res );
// test normal access
-printjson( t.find( { "data.loc" : { $within : { $box : [ [ 0, 0 ], [ 45, 45 ] ] } } } ).toArray() )
+printjson( t.find( { "data.loc" : { $within : { $box : [ [ 0, 0 ], [ 45, 45 ] ] } } } ).toArray() );
assert.eq( 4, t.find( { "data.loc" : { $within : { $box : [ [ 0, 0 ], [ 45, 45 ] ] } } } ).count() );