Skip to content

Commit 7224360

Browse files
forresstnovemberborn
authored andcommitted
Add link to french docs for prefer-t-regex.md and test-title-format.md
1 parent 0856689 commit 7224360

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/rules/prefer-t-regex.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Prefer using `t.regex()` to test regular expressions
22

3+
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/prefer-t-regex.md)
4+
35
The AVA [`t.regex()` assertion](https://github.com/avajs/ava/blob/master/docs/03-assertions.md#regexcontents-regex-message) can test a string against a regular expression.
46

57
This rule will enforce the use of `t.regex()` instead of manually using `RegExp#test()`, which will make your code look clearer and produce better failure output.

docs/rules/test-title-format.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Ensure test titles have a certain format
22

3+
Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/eslint-plugin-ava/docs/rules/test-title-format.md)
4+
35
This rule is useful when you want to make sure all test titles match a common pattern to increase readability when tests fail.
46

57
For example, titles like `'Should throw when invalid.'`, `'Should fail when called.'` or `'Should pass when using any number.'` could be enforced with the following pattern `'^Should (pass|fail|throw) when [\\w ]+\\.$'` (Note the escaped `\`).

0 commit comments

Comments
 (0)