1
1
import parse from '@commitlint/parse' ;
2
- import check from './footer-max-line-length' ;
2
+ import { footerMaxLineLength } from './footer-max-line-length' ;
3
3
4
4
const short = 'BREAKING CHANGE: a' ;
5
5
const long = 'BREAKING CHANGE: ab' ;
@@ -23,37 +23,37 @@ const parsed = {
23
23
} ;
24
24
25
25
test ( 'with simple should succeed' , async ( ) => {
26
- const [ actual ] = check ( await parsed . simple , '' , value ) ;
26
+ const [ actual ] = footerMaxLineLength ( await parsed . simple , undefined , value ) ;
27
27
const expected = true ;
28
28
expect ( actual ) . toEqual ( expected ) ;
29
29
} ) ;
30
30
31
31
test ( 'with empty should succeed' , async ( ) => {
32
- const [ actual ] = check ( await parsed . empty , '' , value ) ;
32
+ const [ actual ] = footerMaxLineLength ( await parsed . empty , undefined , value ) ;
33
33
const expected = true ;
34
34
expect ( actual ) . toEqual ( expected ) ;
35
35
} ) ;
36
36
37
37
test ( 'with short should succeed' , async ( ) => {
38
- const [ actual ] = check ( await parsed . short , '' , value ) ;
38
+ const [ actual ] = footerMaxLineLength ( await parsed . short , undefined , value ) ;
39
39
const expected = true ;
40
40
expect ( actual ) . toEqual ( expected ) ;
41
41
} ) ;
42
42
43
43
test ( 'with long should fail' , async ( ) => {
44
- const [ actual ] = check ( await parsed . long , '' , value ) ;
44
+ const [ actual ] = footerMaxLineLength ( await parsed . long , undefined , value ) ;
45
45
const expected = false ;
46
46
expect ( actual ) . toEqual ( expected ) ;
47
47
} ) ;
48
48
49
49
test ( 'with short with multiple lines should succeed' , async ( ) => {
50
- const [ actual ] = check ( await parsed . short , '' , value ) ;
50
+ const [ actual ] = footerMaxLineLength ( await parsed . short , undefined , value ) ;
51
51
const expected = true ;
52
52
expect ( actual ) . toEqual ( expected ) ;
53
53
} ) ;
54
54
55
55
test ( 'with long with multiple lines should fail' , async ( ) => {
56
- const [ actual ] = check ( await parsed . long , '' , value ) ;
56
+ const [ actual ] = footerMaxLineLength ( await parsed . long , undefined , value ) ;
57
57
const expected = false ;
58
58
expect ( actual ) . toEqual ( expected ) ;
59
59
} ) ;
0 commit comments