File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) 2021 MC-Market (Mick Capital Pty. Ltd.)
22// MIT License (https://github.com/MC-Market-org/js-api-wrapper/blob/main/LICENSE)
33
4+ const assert = require ( "assert" ) ;
45const { SortOptions } = require ( "../src/SortOptions.js" ) ;
56
67function single_sort ( ) {
78 let options = new SortOptions ( ) ;
89 options . sort = "purchases" ;
9-
10- if ( options . toQueryString ( ) !== "?sort=purchases" ) {
11- throw "single_sort() failed - expected did not match actual." ;
12- }
10+ assert . strictEqual ( options . toQueryString ( ) , "?sort=purchases" ) ;
1311}
1412
1513function single_order ( ) {
1614 let options = new SortOptions ( ) ;
1715 options . order = "asc" ;
18-
19- if ( options . toQueryString ( ) !== "?order=asc" ) {
20- throw "single_order() failed - expected did not match actual." ;
21- }
16+ assert . strictEqual ( options . toQueryString ( ) , "?order=asc" ) ;
2217}
2318
2419function single_page ( ) {
2520 let options = new SortOptions ( ) ;
2621 options . page = 5 ;
27-
28- if ( options . toQueryString ( ) !== "?page=5" ) {
29- throw "single_page() failed - expected did not match actual." ;
30- }
22+ assert . strictEqual ( options . toQueryString ( ) , "?page=5" ) ;
3123}
3224
3325single_sort ( ) ;
You can’t perform that action at this time.
0 commit comments