@@ -11,7 +11,8 @@ const messages = {
11
11
'feat(new-parser): introduces a new parsing library\n\nBREAKING CHANGE: new library does not support foo-construct' ,
12
12
with : 'test: subject\nbody\n\nBREAKING CHANGE: something important' ,
13
13
withMulitLine :
14
- 'test: subject\nmulti\nline\nbody\n\nBREAKING CHANGE: something important'
14
+ 'test: subject\nmulti\nline\nbody\n\nBREAKING CHANGE: something important' ,
15
+ withDoubleNewLine : 'fix: some issue\n\ndetailed explanation\n\ncloses #123'
15
16
} ;
16
17
17
18
const parsed = {
@@ -21,7 +22,8 @@ const parsed = {
21
22
without : parse ( messages . without ) ,
22
23
withoutBody : parse ( messages . withoutBody ) ,
23
24
with : parse ( messages . with ) ,
24
- withMulitLine : parse ( messages . withMulitLine )
25
+ withMulitLine : parse ( messages . withMulitLine ) ,
26
+ withDoubleNewLine : parse ( messages . withDoubleNewLine )
25
27
} ;
26
28
27
29
test ( 'with simple message should succeed for empty keyword' , async t => {
@@ -143,3 +145,15 @@ test('with blank line before footer and multiline body should succeed for "alway
143
145
const expected = true ;
144
146
t . is ( actual , expected ) ;
145
147
} ) ;
148
+
149
+ test ( 'with double blank line before footer and double line in body should fail for "never"' , async t => {
150
+ const [ actual ] = footerLeadingBlank ( await parsed . withDoubleNewLine , 'never' ) ;
151
+ const expected = false ;
152
+ t . is ( actual , expected ) ;
153
+ } ) ;
154
+
155
+ test ( 'with double blank line before footer and double line in body should succeed for "always"' , async t => {
156
+ const [ actual ] = footerLeadingBlank ( await parsed . withDoubleNewLine , 'always' ) ;
157
+ const expected = true ;
158
+ t . is ( actual , expected ) ;
159
+ } ) ;
0 commit comments