@@ -11,7 +11,8 @@ const messages = {
1111 'feat(new-parser): introduces a new parsing library\n\nBREAKING CHANGE: new library does not support foo-construct' ,
1212 with : 'test: subject\nbody\n\nBREAKING CHANGE: something important' ,
1313 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'
1516} ;
1617
1718const parsed = {
@@ -21,7 +22,8 @@ const parsed = {
2122 without : parse ( messages . without ) ,
2223 withoutBody : parse ( messages . withoutBody ) ,
2324 with : parse ( messages . with ) ,
24- withMulitLine : parse ( messages . withMulitLine )
25+ withMulitLine : parse ( messages . withMulitLine ) ,
26+ withDoubleNewLine : parse ( messages . withDoubleNewLine )
2527} ;
2628
2729test ( '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
143145 const expected = true ;
144146 t . is ( actual , expected ) ;
145147} ) ;
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