From c5247db273fef2e932299b409276ab3fcedc68c7 Mon Sep 17 00:00:00 2001 From: Cas Cornelissen Date: Thu, 5 Aug 2021 14:23:55 +0200 Subject: [PATCH] docs(valid-title): fix regex in mustMatch and mustNotMatch examples The `$` character is used to assert at the end of the line and the examples show strings that start with a specific word for which the `^` character should be used. --- docs/rules/valid-title.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/rules/valid-title.md b/docs/rules/valid-title.md index 53204bca3..a5edda67e 100644 --- a/docs/rules/valid-title.md +++ b/docs/rules/valid-title.md @@ -204,11 +204,11 @@ specific Jest test function groups (`describe`, `test`, and `it`). Examples of **incorrect** code when using `mustMatch`: ```js -// with mustMatch: '$that' +// with mustMatch: '^that' describe('the correct way to do things', () => {}); fit('this there!', () => {}); -// with mustMatch: { test: '$that' } +// with mustMatch: { test: '^that' } describe('the tests that will be run', () => {}); test('the stuff works', () => {}); xtest('errors that are thrown have messages', () => {}); @@ -217,11 +217,11 @@ xtest('errors that are thrown have messages', () => {}); Examples of **correct** code when using `mustMatch`: ```js -// with mustMatch: '$that' +// with mustMatch: '^that' describe('that thing that needs to be done', () => {}); fit('that this there!', () => {}); -// with mustMatch: { test: '$that' } +// with mustMatch: { test: '^that' } describe('the tests that will be run', () => {}); test('that the stuff works', () => {}); xtest('that errors that thrown have messages', () => {});