Skip to content

Commit

Permalink
feat: add no-conditional-expect to the recommended ruleset
Browse files Browse the repository at this point in the history
BREAKING CHANGE: recommend `no-conditional-expect` rule
  • Loading branch information
G-Rath authored and SimenB committed Sep 4, 2020
1 parent 3705dff commit 40cd89d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -135,7 +135,7 @@ installations requiring long-term consistency.
| [lowercase-name](docs/rules/lowercase-name.md) | Enforce lowercase test names | | ![fixable][] |
| [no-alias-methods](docs/rules/no-alias-methods.md) | Disallow alias methods | ![style][] | ![fixable][] |
| [no-commented-out-tests](docs/rules/no-commented-out-tests.md) | Disallow commented out tests | ![recommended][] | |
| [no-conditional-expect](docs/rules/no-conditional-expect.md) | Prevent calling `expect` conditionally | | |
| [no-conditional-expect](docs/rules/no-conditional-expect.md) | Prevent calling `expect` conditionally | ![recommended][] | |
| [no-deprecated-functions](docs/rules/no-deprecated-functions.md) | Disallow use of deprecated functions | ![recommended][] | ![fixable][] |
| [no-disabled-tests](docs/rules/no-disabled-tests.md) | Disallow disabled tests | ![recommended][] | |
| [no-duplicate-hooks](docs/rules/no-duplicate-hooks.md) | Disallow duplicate setup and teardown hooks | | |
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/__snapshots__/rules.test.ts.snap
Expand Up @@ -66,6 +66,7 @@ Object {
"rules": Object {
"jest/expect-expect": "warn",
"jest/no-commented-out-tests": "warn",
"jest/no-conditional-expect": "error",
"jest/no-deprecated-functions": "error",
"jest/no-disabled-tests": "warn",
"jest/no-export": "error",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-conditional-expect.ts
Expand Up @@ -12,7 +12,7 @@ export default createRule({
docs: {
description: 'Prevent calling `expect` conditionally',
category: 'Best Practices',
recommended: false,
recommended: 'error',
},
messages: {
conditionalExpect: 'Avoid calling `expect` conditionally`',
Expand Down

0 comments on commit 40cd89d

Please sign in to comment.