Skip to content

Commit 0e35cd0

Browse files
committed
test(parser): add failing test
1 parent f1d3cd7 commit 0e35cd0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

@commitlint/parse/src/index.test.ts

+19
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,25 @@ test('registers inline #', async () => {
168168
expect(actual.body).toBe('things #reference');
169169
});
170170

171+
test('keep -side notes- in the body section', async () => {
172+
const header = "type(some/scope): subject"
173+
const body =
174+
"CI on master branch caught this:\n\n" +
175+
"```\n" +
176+
"Unhandled Exception:\n" +
177+
"System.AggregateException: One or more errors occurred. (Some problem when connecting to 'api.mycryptoapi.com/eth')\n\n" +
178+
"--- End of stack trace from previous location where exception was thrown ---\n\n" +
179+
"at GWallet.Backend.FSharpUtil.ReRaise (System.Exception ex) [0x00000] in /Users/runner/work/geewallet/geewallet/src/GWallet.Backend/FSharpUtil.fs:206\n" +
180+
"...\n" +
181+
"```";
182+
183+
const message = header + "\n\n" + body
184+
185+
const actual = await parse(message);
186+
187+
expect(actual.body).toBe(body);
188+
});
189+
171190
test('parses references leading subject', async () => {
172191
const message = '#1 some subject';
173192
const opts = await require('conventional-changelog-angular');

0 commit comments

Comments
 (0)