Skip to content

Commit 855ba83

Browse files
committed
adding test setLimit method
1 parent cf2dfc9 commit 855ba83

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/woqlQuery.spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,12 @@ describe('woql query object', function () {
558558
global.sandbox.stub(axios, "get").returns(Promise.resolve({status:200, data: {}}));
559559

560560
const woqlObject=WOQL.limit(2);
561+
const woqlObject2=WOQL.start(5).limit(2);
561562

562563
const jsonObj={ start: [ 10, { limit: [ 2, {} ] } ] };
563564

564565
expect(woqlObject.addStart(10).json()).to.eql(jsonObj);
566+
expect(woqlObject2.addStart(10).json()).to.eql(jsonObj);
565567

566568
})
567569

@@ -585,4 +587,15 @@ describe('woql query object', function () {
585587

586588
})
587589

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+
588601
});

0 commit comments

Comments
 (0)