@@ -7,6 +7,8 @@ const messages = {
7
7
body : 'chore: subject\nbody' ,
8
8
trailing : 'chore: subject\nbody\n\n' ,
9
9
without : 'chore: subject\nbody\nBREAKING CHANGE: something important' ,
10
+ withoutBody :
11
+ 'feat(new-parser): introduces a new parsing library\n\nBREAKING CHANGE: new library does not support foo-construct' ,
10
12
with : 'chore: subject\nbody\n\nBREAKING CHANGE: something important' ,
11
13
withMulitLine :
12
14
'chore: subject\nmulti\nline\nbody\n\nBREAKING CHANGE: something important'
@@ -17,6 +19,7 @@ const parsed = {
17
19
body : parse ( messages . body ) ,
18
20
trailing : parse ( messages . trailing ) ,
19
21
without : parse ( messages . without ) ,
22
+ withoutBody : parse ( messages . withoutBody ) ,
20
23
with : parse ( messages . with ) ,
21
24
withMulitLine : parse ( messages . withMulitLine )
22
25
} ;
@@ -75,6 +78,18 @@ test('with trailing message should succeed for "always"', async t => {
75
78
t . is ( actual , expected ) ;
76
79
} ) ;
77
80
81
+ test . failing ( 'without body should succeed for "never"' , async t => {
82
+ const [ actual ] = footerLeadingBlank ( await parsed . withoutBody , 'never' ) ;
83
+ const expected = true ;
84
+ t . is ( actual , expected ) ;
85
+ } ) ;
86
+
87
+ test . failing ( 'without body should succeed for "always"' , async t => {
88
+ const [ actual ] = footerLeadingBlank ( await parsed . withoutBody , 'always' ) ;
89
+ const expected = true ;
90
+ t . is ( actual , expected ) ;
91
+ } ) ;
92
+
78
93
test ( 'without blank line before footer should fail for empty keyword' , async t => {
79
94
const [ actual ] = footerLeadingBlank ( await parsed . without ) ;
80
95
const expected = false ;
0 commit comments