File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -558,10 +558,12 @@ describe('woql query object', function () {
558
558
global . sandbox . stub ( axios , "get" ) . returns ( Promise . resolve ( { status :200 , data : { } } ) ) ;
559
559
560
560
const woqlObject = WOQL . limit ( 2 ) ;
561
+ const woqlObject2 = WOQL . start ( 5 ) . limit ( 2 ) ;
561
562
562
563
const jsonObj = { start : [ 10 , { limit : [ 2 , { } ] } ] } ;
563
564
564
565
expect ( woqlObject . addStart ( 10 ) . json ( ) ) . to . eql ( jsonObj ) ;
566
+ expect ( woqlObject2 . addStart ( 10 ) . json ( ) ) . to . eql ( jsonObj ) ;
565
567
566
568
} )
567
569
@@ -585,4 +587,15 @@ describe('woql query object', function () {
585
587
586
588
} )
587
589
590
+ it ( 'check the setLimit not first method' , function ( ) {
591
+ global . sandbox . stub ( axios , "get" ) . returns ( Promise . resolve ( { status :200 , data : { } } ) ) ;
592
+
593
+ const woqlObject = WOQL . limit ( 2 ) . start ( 10 ) ;
594
+
595
+ const jsonObj = { limit : [ 3 , { start : [ 0 , { } ] } ] } ;
596
+
597
+ expect ( woqlObject . setLimit ( 3 ) . json ( ) ) . to . eql ( jsonObj ) ;
598
+
599
+ } )
600
+
588
601
} ) ;
You can’t perform that action at this time.
0 commit comments