@@ -15,9 +15,14 @@ describe('utils tests', () => {
15
15
expected . forEach ( ( e ) => assert . deepEqual ( taglistOrderVariants ( e ) , e ) ) ;
16
16
} ) ;
17
17
18
+ it ( 'should return correct default order' , ( ) => {
19
+ const expected = 'alpha-asc;num-desc' ;
20
+ [ undefined , '' ] . forEach ( ( e ) => assert . deepEqual ( taglistOrderVariants ( e ) , expected ) ) ;
21
+ } ) ;
22
+
18
23
it ( 'should return correct variant of `num-asc;alpha-asc`' , ( ) => {
19
24
const expected = 'num-asc;alpha-asc' ;
20
- [ undefined , '' , 'asc' , 'num-asc' ] . forEach ( ( e ) => assert . deepEqual ( taglistOrderVariants ( e ) , expected ) ) ;
25
+ [ 'asc' , 'num-asc' ] . forEach ( ( e ) => assert . deepEqual ( taglistOrderVariants ( e ) , expected ) ) ;
21
26
} ) ;
22
27
23
28
it ( 'should return correct variant of `alpha-desc;num-desc`' , ( ) => {
@@ -39,7 +44,7 @@ describe('utils tests', () => {
39
44
40
45
describe ( 'taglistOrderParser' , ( ) => {
41
46
it ( 'should have default configuration when empty or undefined' , ( ) => {
42
- const expected = { numAsc : true , alphaAsc : true , numFirst : true } ;
47
+ const expected = { numAsc : false , alphaAsc : true , numFirst : false } ;
43
48
assert . deepEqual ( taglistOrderParser ( ) , expected ) ;
44
49
assert . deepEqual ( taglistOrderParser ( '' ) , expected ) ;
45
50
} ) ;
0 commit comments