Skip to content

Commit 92210df

Browse files
committed
fix: Add bug repro for suggested header pattern and correspondence
1 parent 677b895 commit 92210df

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/validatePrTitle.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ it('throws for PR titles with an unknown type', async () => {
4242
describe('regex types', () => {
4343
const headerPattern = /^([\w-]*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$/;
4444

45+
it('works with the suggested header pattern and correspondence', async () => {
46+
await validatePrTitle('fix(deps): delay for tagging lambda', {
47+
headerPattern: '^(\\w*)(?:\\(([\\w$.\\-*/ ]*)\\))?: (.*)$',
48+
headerPatternCorrespondence: ['type', 'scope', 'subject']
49+
});
50+
});
51+
4552
it('allows a regex matching type', async () => {
4653
await validatePrTitle('JIRA-123: Bar', {
4754
types: ['JIRA-\\d+'],

0 commit comments

Comments
 (0)