File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ import { QualifiedRules , RuleConfigSeverity } from '@commitlint/types' ;
2+ import { breakingChangeFilterFactory } from './footer-maker' ;
3+
4+ describe ( 'footerMaker' , ( ) => {
5+ describe ( 'breakingChangeFilterFactory' , ( ) => {
6+ it ( 'should break in footer when exceeding maximum specified line length' , ( ) => {
7+ const rules : QualifiedRules = { 'footer-max-line-length' : [ RuleConfigSeverity . Error , 'always' , 11 ] } ;
8+ const fixture = breakingChangeFilterFactory ( rules , 'BREAKING CHANGE: ' ) ! ;
9+
10+ const result = fixture ( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.' , { } ) ;
11+
12+ expect ( result ) . toBe ( `BREAKING \nCHANGE: \nLorem ipsum \ndolor sit \namet, \nconsectetur \nadipisicing \nelit.` ) ;
13+ } ) ;
14+ } ) ;
15+ } ) ;
You can’t perform that action at this time.
0 commit comments