Skip to content

Commit

Permalink
commitlint: failing test for issue 148
Browse files Browse the repository at this point in the history
  • Loading branch information
Mersho committed Jan 30, 2024
1 parent 9f5810c commit e26655f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions commitlint/plugins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,26 @@ test("footer-refs-validity8", () => {
expect(footerRefsValidity8.status).toBe(0);
});

// This test reflects this issue: https://github.com/nblockchain/conventions/issues/148
test("footer-refs-validity9", () => {
let commitMsgWithTwoCodeBlocksAtBodyWithRef =
"foo: blah blah" +
"\n\n" +
"Blah blah [1]:" +
"\n\n" +
"```\nsomeCodeBlock\n```" +
"\n\n" +
"[1]: Blah blah blah blah" +
"\n\n" +
"Stack trace: " +
"\n\n" +
"```\nsomeCodeBlock\n```";
let footerRefsValidity9 = runCommitLintOnMsg(
commitMsgWithTwoCodeBlocksAtBodyWithRef
);
expect(footerRefsValidity9.status).toBe(0);
});

test("prefer-slash-over-backslash1", () => {
let commitMsgWithBackslash = "foo\\bar: bla bla bla";
let preferSlashOverBackslash1 = runCommitLintOnMsg(commitMsgWithBackslash);
Expand Down

0 comments on commit e26655f

Please sign in to comment.