File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11import { QualifiedRules , RuleConfigSeverity } from '@commitlint/types' ;
2- import { breakingChangeFilterFactory } from './footer-maker' ;
2+ import { breakingChangeFilterFactory , issueFilterFactory } from './footer-maker' ;
33
44describe ( 'footerMaker' , ( ) => {
55 describe ( 'breakingChangeFilterFactory' , ( ) => {
@@ -12,4 +12,15 @@ describe('footerMaker', () => {
1212 expect ( result ) . toBe ( `BREAKING \nCHANGE: \nLorem ipsum \ndolor sit \namet, \nconsectetur \nadipisicing \nelit.` ) ;
1313 } ) ;
1414 } ) ;
15+
16+ describe ( 'issueFilterFactory' , ( ) => {
17+ it ( 'should add leading blank line before issue line if is breaking change' , ( ) => {
18+ const rules = { } ;
19+
20+ const fixture = issueFilterFactory ( rules ) ! ;
21+
22+ const result = fixture ( 'Closes #123' , { isBreaking : true } ) ;
23+ expect ( result ) . toBe ( '\nCloses #123' ) ;
24+ } ) ;
25+ } ) ;
1526} ) ;
You can’t perform that action at this time.
0 commit comments