You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: @commitlint/format/src/format.test.ts
+14-12Lines changed: 14 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -82,60 +82,62 @@ test("returns legacy output with full commit message if verbose and legacyOutput
82
82
);
83
83
});
84
84
85
-
test('returns input banner with errors and multi-line input',()=>{
85
+
test("returns input banner with errors and multi-line input",()=>{
86
86
constactual=format(
87
87
{
88
88
results: [
89
89
{
90
90
errors: [
91
91
{
92
92
level: 2,
93
-
name: 'type-enum',
93
+
name: "type-enum",
94
94
message:
95
-
'type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]',
95
+
"type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]",
96
96
},
97
97
],
98
98
warnings: [],
99
-
input: 'foo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester',
99
+
input:
100
+
"foo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester",
100
101
},
101
102
],
102
103
},
103
104
{
104
105
color: false,
105
-
}
106
+
},
106
107
);
107
108
108
109
expect(actual).toStrictEqual(
109
-
'⧗ --- input ---\nfoo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester\n✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]\n\n✖ found 1 problems, 0 warnings'
110
+
"⧗ --- input ---\nfoo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester\n✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]\n\n✖ found 1 problems, 0 warnings\n",
110
111
);
111
112
});
112
113
113
-
test('returns legacy input banner with errors and multi-line input',()=>{
114
+
test("returns legacy input banner with errors and multi-line input",()=>{
114
115
constactual=format(
115
116
{
116
117
results: [
117
118
{
118
119
errors: [
119
120
{
120
121
level: 2,
121
-
name: 'type-enum',
122
+
name: "type-enum",
122
123
message:
123
-
'type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]',
124
+
"type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]",
124
125
},
125
126
],
126
127
warnings: [],
127
-
input: 'foo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester',
128
+
input:
129
+
"foo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester",
128
130
},
129
131
],
130
132
},
131
133
{
132
134
color: false,
133
135
legacyOutput: true,
134
-
}
136
+
},
135
137
);
136
138
137
139
expect(actual).toStrictEqual(
138
-
'⧗ input: foo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester\n✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]\n\n✖ found 1 problems, 0 warnings'
140
+
"⧗ input: foo: this is an invalid header\n\nThis is a body\n\nSigned-off-by: tester\n✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]\n\n✖ found 1 problems, 0 warnings\n",
0 commit comments