File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 11import { QualifiedRules , RuleConfigSeverity } from '@commitlint/types' ;
2- import { breakingChangeFilterFactory , breakingChangeMessageFactory , issueFilterFactory } from './footer-maker' ;
2+ import {
3+ breakingChangeFilterFactory ,
4+ breakingChangeMessageFactory ,
5+ issueFilterFactory ,
6+ issuesMessageFactory ,
7+ } from './footer-maker' ;
38
49describe ( 'footerMaker' , ( ) => {
510 describe ( 'breakingChangeFilterFactory' , ( ) => {
@@ -34,4 +39,15 @@ describe('footerMaker', () => {
3439 expect ( result ) . toBe ( 'Describe the breaking changes (max 50 chars):\n' ) ;
3540 } ) ;
3641 } ) ;
42+
43+ describe ( 'issuesMessageFactory' , ( ) => {
44+ it ( 'should show a message when footer has maximum length rule' , ( ) => {
45+ const rules : QualifiedRules = { 'footer-max-length' : [ RuleConfigSeverity . Error , 'always' , 88 ] } ;
46+
47+ const fixture = issuesMessageFactory ( rules ) ;
48+
49+ const result = fixture ( ) ;
50+ expect ( result ) . toBe ( 'Add issue references (e.g. "fix #123", "re #123".) (max 88 chars):\n' ) ;
51+ } ) ;
52+ } ) ;
3753} ) ;
You can’t perform that action at this time.
0 commit comments