@@ -33,25 +33,43 @@ describe('footerMaker', () => {
33
33
} ) ;
34
34
35
35
describe ( 'breakingChangeMessageFactory' , ( ) => {
36
- it ( 'should show a message when footer has maximum length rule' , ( ) => {
36
+ it ( 'should show a message when footer has maximum length rule set ' , ( ) => {
37
37
const rules : QualifiedRules = { 'footer-max-length' : [ RuleConfigSeverity . Error , 'always' , 50 ] } ;
38
38
39
39
const fixture = breakingChangeMessageFactory ( rules ) ;
40
40
41
41
const result = fixture ( ) ;
42
42
expect ( result ) . toBe ( 'Describe the breaking changes (max 50 chars):\n' ) ;
43
43
} ) ;
44
+
45
+ it ( 'should show a message when footer has not maximum length rule set' , ( ) => {
46
+ const rules : QualifiedRules = { 'footer-max-length' : [ RuleConfigSeverity . Disabled , 'always' , 50 ] } ;
47
+
48
+ const fixture = breakingChangeMessageFactory ( rules ) ;
49
+
50
+ const result = fixture ( ) ;
51
+ expect ( result ) . toBe ( 'Describe the breaking changes:\n' ) ;
52
+ } ) ;
44
53
} ) ;
45
54
46
55
describe ( 'issuesMessageFactory' , ( ) => {
47
- it ( 'should show a message when footer has maximum length rule' , ( ) => {
56
+ it ( 'should show a message when footer has maximum length rule set ' , ( ) => {
48
57
const rules : QualifiedRules = { 'footer-max-length' : [ RuleConfigSeverity . Error , 'always' , 88 ] } ;
49
58
50
59
const fixture = issuesMessageFactory ( rules ) ;
51
60
52
61
const result = fixture ( ) ;
53
62
expect ( result ) . toBe ( 'Add issue references (e.g. "fix #123", "re #123".) (max 88 chars):\n' ) ;
54
63
} ) ;
64
+
65
+ it ( 'should show a message when footer has not maximum length rule set' , ( ) => {
66
+ const rules : QualifiedRules = { 'footer-max-length' : [ RuleConfigSeverity . Disabled , 'always' , 88 ] } ;
67
+
68
+ const fixture = issuesMessageFactory ( rules ) ;
69
+
70
+ const result = fixture ( ) ;
71
+ expect ( result ) . toBe ( 'Add issue references (e.g. "fix #123", "re #123".):\n' ) ;
72
+ } ) ;
55
73
} ) ;
56
74
57
75
describe ( 'breakingTransformFactory' , ( ) => {
0 commit comments