diff --git a/README.md b/README.md index 3cdbdf624..74f76108c 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ installations requiring long-term consistency. | [require-hook](docs/rules/require-hook.md) | Require setup and teardown code to be within a hook | | | | [require-to-throw-message](docs/rules/require-to-throw-message.md) | Require a message for `toThrow()` | | | | [require-top-level-describe](docs/rules/require-top-level-describe.md) | Require test cases and hooks to be inside a `describe` block | | | -| [valid-describe](docs/rules/valid-describe.md) | Enforce valid `describe()` callback | ![recommended][] | | +| [valid-describe-callback](docs/rules/valid-describe-callback.md) | Enforce valid `describe()` callback | ![recommended][] | | | [valid-expect](docs/rules/valid-expect.md) | Enforce valid `expect()` usage | ![recommended][] | | | [valid-expect-in-promise](docs/rules/valid-expect-in-promise.md) | Ensure promises that have expectations in their chain are valid | ![recommended][] | | | [valid-title](docs/rules/valid-title.md) | Enforce valid titles | ![recommended][] | ![fixable][] | diff --git a/docs/rules/valid-describe.md b/docs/rules/valid-describe-callback.md similarity index 95% rename from docs/rules/valid-describe.md rename to docs/rules/valid-describe-callback.md index b79449df3..32ef3a18e 100644 --- a/docs/rules/valid-describe.md +++ b/docs/rules/valid-describe-callback.md @@ -1,4 +1,4 @@ -# Enforce valid `describe()` callback (`valid-describe`) +# Enforce valid `describe()` callback (`valid-describe-callback`) Using an improper `describe()` callback function can lead to unexpected test errors. diff --git a/src/__tests__/__snapshots__/rules.test.ts.snap b/src/__tests__/__snapshots__/rules.test.ts.snap index 66a0e7c39..ce45d2b14 100644 --- a/src/__tests__/__snapshots__/rules.test.ts.snap +++ b/src/__tests__/__snapshots__/rules.test.ts.snap @@ -49,7 +49,7 @@ Object { "jest/require-to-throw-message": "error", "jest/require-top-level-describe": "error", "jest/unbound-method": "error", - "jest/valid-describe": "error", + "jest/valid-describe-callback": "error", "jest/valid-expect": "error", "jest/valid-expect-in-promise": "error", "jest/valid-title": "error", @@ -78,7 +78,7 @@ Object { "jest/no-mocks-import": "error", "jest/no-standalone-expect": "error", "jest/no-test-prefixes": "error", - "jest/valid-describe": "error", + "jest/valid-describe-callback": "error", "jest/valid-expect": "error", "jest/valid-expect-in-promise": "error", "jest/valid-title": "error", diff --git a/src/rules/__tests__/valid-describe.test.ts b/src/rules/__tests__/valid-describe-callback.test.ts similarity index 98% rename from src/rules/__tests__/valid-describe.test.ts rename to src/rules/__tests__/valid-describe-callback.test.ts index 2fe007afb..376ac15e7 100644 --- a/src/rules/__tests__/valid-describe.test.ts +++ b/src/rules/__tests__/valid-describe-callback.test.ts @@ -1,7 +1,7 @@ import { TSESLint } from '@typescript-eslint/experimental-utils'; import dedent from 'dedent'; import resolveFrom from 'resolve-from'; -import rule from '../valid-describe'; +import rule from '../valid-describe-callback'; const ruleTester = new TSESLint.RuleTester({ parser: resolveFrom(require.resolve('eslint'), 'espree'), @@ -10,7 +10,7 @@ const ruleTester = new TSESLint.RuleTester({ }, }); -ruleTester.run('valid-describe', rule, { +ruleTester.run('valid-describe-callback', rule, { valid: [ 'describe.each([1, 2, 3])("%s", (a, b) => {});', 'describe("foo", function() {})', diff --git a/src/rules/valid-describe.ts b/src/rules/valid-describe-callback.ts similarity index 100% rename from src/rules/valid-describe.ts rename to src/rules/valid-describe-callback.ts