diff options
author | Mike Grundy <michael.grundy@10gen.com> | 2016-02-04 12:29:01 -0500 |
---|---|---|
committer | Mike Grundy <michael.grundy@10gen.com> | 2016-02-09 13:41:02 -0500 |
commit | 3bed8596d18275d1561e4f44f1f0bd72c1e038f1 (patch) | |
tree | 788eaed3c7a692a424f080d16a8841dc8afa3c13 /jstests/core/geo2.js | |
parent | 985e2a0be95709ac064c57f0a9bb385a55937285 (diff) | |
download | mongo-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/geo2.js')
-rw-r--r-- | jstests/core/geo2.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/core/geo2.js b/jstests/core/geo2.js index 4691eb8d6d5..4317d044f76 100644 --- a/jstests/core/geo2.js +++ b/jstests/core/geo2.js @@ -1,5 +1,5 @@ -t = db.geo2 +t = db.geo2; t.drop(); n = 1; @@ -14,7 +14,7 @@ assert.eq( t.count(), 100 * 100 ); assert.eq( t.count(), n - 1 ); -t.ensureIndex( { loc : "2d" } ) +t.ensureIndex( { loc : "2d" } ); fast = db.runCommand( { geoNear : t.getName() , near : [ 50 , 50 ] , num : 10 } ); @@ -29,17 +29,17 @@ function a( cur ){ return total/outof; } -assert.close( fast.stats.avgDistance , a( t.find( { loc : { $near : [ 50 , 50 ] } } ).limit(10) ) , "B1" ) +assert.close( fast.stats.avgDistance , a( t.find( { loc : { $near : [ 50 , 50 ] } } ).limit(10) ) , "B1" ); assert.close( 1.33333 , a( t.find( { loc : { $near : [ 50 , 50 ] } } ).limit(3) ) , "B2" ); assert.close( fast.stats.avgDistance , a( t.find( { loc : { $near : [ 50 , 50 ] } } ).limit(10) ) , "B3" ); -printjson( t.find( { loc : { $near : [ 50 , 50 ] } } ).explain() ) +printjson( t.find( { loc : { $near : [ 50 , 50 ] } } ).explain() ); -assert.lt( 3 , a( t.find( { loc : { $near : [ 50 , 50 ] } } ).limit(50) ) , "C1" ) -assert.gt( 3 , a( t.find( { loc : { $near : [ 50 , 50 , 3 ] } } ).limit(50) ) , "C2" ) -assert.gt( 3 , a( t.find( { loc : { $near : [ 50 , 50 ] , $maxDistance : 3 } } ).limit(50) ) , "C3" ) +assert.lt( 3 , a( t.find( { loc : { $near : [ 50 , 50 ] } } ).limit(50) ) , "C1" ); +assert.gt( 3 , a( t.find( { loc : { $near : [ 50 , 50 , 3 ] } } ).limit(50) ) , "C2" ); +assert.gt( 3 , a( t.find( { loc : { $near : [ 50 , 50 ] , $maxDistance : 3 } } ).limit(50) ) , "C3" ); // SERVER-8974 - test if $geoNear operator works with 2d index as well var geoNear_cursor = t.find( { loc : { $geoNear : [50, 50] } } ).limit(100); -assert.eq( geoNear_cursor.count(true), 100 ) +assert.eq( geoNear_cursor.count(true), 100 ); |