@@ -546,33 +546,33 @@ describe('mquery', function() {
546546 describe ( 'of length 1' , function ( ) {
547547 it ( 'delegates to circle when center exists' , function ( ) {
548548 const m = mquery ( ) . where ( 'loc' ) . within ( { center : [ 10 , 10 ] , radius : 3 } ) ;
549- assert . deepEqual ( { $within : { $center : [ [ 10 , 10 ] , 3 ] } } , m . _conditions . loc ) ;
549+ assert . deepEqual ( { $geoWithin : { $center : [ [ 10 , 10 ] , 3 ] } } , m . _conditions . loc ) ;
550550 } ) ;
551551 it ( 'delegates to box when exists' , function ( ) {
552552 const m = mquery ( ) . where ( 'loc' ) . within ( { box : [ [ 10 , 10 ] , [ 11 , 14 ] ] } ) ;
553- assert . deepEqual ( { $within : { $box : [ [ 10 , 10 ] , [ 11 , 14 ] ] } } , m . _conditions . loc ) ;
553+ assert . deepEqual ( { $geoWithin : { $box : [ [ 10 , 10 ] , [ 11 , 14 ] ] } } , m . _conditions . loc ) ;
554554 } ) ;
555555 it ( 'delegates to polygon when exists' , function ( ) {
556556 const m = mquery ( ) . where ( 'loc' ) . within ( { polygon : [ [ 10 , 10 ] , [ 11 , 14 ] , [ 10 , 9 ] ] } ) ;
557- assert . deepEqual ( { $within : { $polygon : [ [ 10 , 10 ] , [ 11 , 14 ] , [ 10 , 9 ] ] } } , m . _conditions . loc ) ;
557+ assert . deepEqual ( { $geoWithin : { $polygon : [ [ 10 , 10 ] , [ 11 , 14 ] , [ 10 , 9 ] ] } } , m . _conditions . loc ) ;
558558 } ) ;
559559 it ( 'delegates to geometry when exists' , function ( ) {
560560 const m = mquery ( ) . where ( 'loc' ) . within ( { type : 'Polygon' , coordinates : [ [ 10 , 10 ] , [ 11 , 14 ] , [ 10 , 9 ] ] } ) ;
561- assert . deepEqual ( { $within : { $geometry : { type : 'Polygon' , coordinates : [ [ 10 , 10 ] , [ 11 , 14 ] , [ 10 , 9 ] ] } } } , m . _conditions . loc ) ;
561+ assert . deepEqual ( { $geoWithin : { $geometry : { type : 'Polygon' , coordinates : [ [ 10 , 10 ] , [ 11 , 14 ] , [ 10 , 9 ] ] } } } , m . _conditions . loc ) ;
562562 } ) ;
563563 } ) ;
564564
565565 describe ( 'of length 2' , function ( ) {
566566 it ( 'delegates to box()' , function ( ) {
567567 const m = mquery ( ) . where ( 'loc' ) . within ( [ 1 , 2 ] , [ 2 , 5 ] ) ;
568- assert . deepEqual ( m . _conditions . loc , { $within : { $box : [ [ 1 , 2 ] , [ 2 , 5 ] ] } } ) ;
568+ assert . deepEqual ( m . _conditions . loc , { $geoWithin : { $box : [ [ 1 , 2 ] , [ 2 , 5 ] ] } } ) ;
569569 } ) ;
570570 } ) ;
571571
572572 describe ( 'of length > 2' , function ( ) {
573573 it ( 'delegates to polygon()' , function ( ) {
574574 const m = mquery ( ) . where ( 'loc' ) . within ( [ 1 , 2 ] , [ 2 , 5 ] , [ 2 , 4 ] , [ 1 , 3 ] ) ;
575- assert . deepEqual ( m . _conditions . loc , { $within : { $polygon : [ [ 1 , 2 ] , [ 2 , 5 ] , [ 2 , 4 ] , [ 1 , 3 ] ] } } ) ;
575+ assert . deepEqual ( m . _conditions . loc , { $geoWithin : { $polygon : [ [ 1 , 2 ] , [ 2 , 5 ] , [ 2 , 4 ] , [ 1 , 3 ] ] } } ) ;
576576 } ) ;
577577 } ) ;
578578 } ) ;
0 commit comments