@@ -104,46 +104,47 @@ installations requiring long-term consistency.
104
104
105
105
## Rules
106
106
107
- | Rule | Description | Recommended | Fixable |
108
- | ---------------------------- | ----------------------------------------------------------------- | ---------------- | ------------------- |
109
- | [ consistent-test-it] [ ] | Enforce consistent test or it keyword | | ![ fixable-green] [ ] |
110
- | [ expect-expect] [ ] | Enforce assertion to be made in a test body | | |
111
- | [ lowercase-name] [ ] | Disallow capitalized test names | | ![ fixable-green] [ ] |
112
- | [ no-alias-methods] [ ] | Disallow alias methods | ![ recommended] [ ] | ![ fixable-green] [ ] |
113
- | [ no-commented-out-tests] [ ] | Disallow commented out tests | | |
114
- | [ no-disabled-tests] [ ] | Disallow disabled tests | ![ recommended] [ ] | |
115
- | [ no-duplicate-hooks] [ ] | Disallow duplicate hooks within a ` describe ` block | | |
116
- | [ no-empty-title] [ ] | Disallow empty titles | | |
117
- | [ no-expect-resolves] [ ] | Disallow using ` expect().resolves ` | | |
118
- | [ no-export] [ ] | Disallow export from test files | | |
119
- | [ no-focused-tests] [ ] | Disallow focused tests | ![ recommended] [ ] | |
120
- | [ no-hooks] [ ] | Disallow setup and teardown hooks | | |
121
- | [ no-identical-title] [ ] | Disallow identical titles | ![ recommended] [ ] | |
122
- | [ no-if] [ ] | Disallow conditional logic | | |
123
- | [ no-jasmine-globals] [ ] | Disallow Jasmine globals | ![ recommended] [ ] | ![ fixable-yellow] [ ] |
124
- | [ no-jest-import] [ ] | Disallow importing ` jest ` | ![ recommended] [ ] | |
125
- | [ no-large-snapshots] [ ] | Disallow large snapshots | | |
126
- | [ no-mocks-import] [ ] | Disallow manually importing from ` __mocks__ ` | | |
127
- | [ no-standalone-expect] [ ] | Prevents ` expect ` statements outside of a ` test ` or ` it ` block | | |
128
- | [ no-test-callback] [ ] | Using a callback in asynchronous tests | | ![ fixable-green] [ ] |
129
- | [ no-test-prefixes] [ ] | Disallow using ` f ` & ` x ` prefixes to define focused/skipped tests | ![ recommended] [ ] | ![ fixable-green] [ ] |
130
- | [ no-test-return-statement] [ ] | Disallow explicitly returning from tests | | |
131
- | [ no-truthy-falsy] [ ] | Disallow using ` toBeTruthy() ` & ` toBeFalsy() ` | | |
132
- | [ no-try-expect] [ ] | Prevent ` catch ` assertions in tests | | |
133
- | [ prefer-called-with] [ ] | Suggest using ` toBeCalledWith() ` OR ` toHaveBeenCalledWith() ` | | |
134
- | [ prefer-expect-assertions] [ ] | Suggest using ` expect.assertions() ` OR ` expect.hasAssertions() ` | | |
135
- | [ prefer-inline-snapshots] [ ] | Suggest using ` toMatchInlineSnapshot() ` | | ![ fixable-green] [ ] |
136
- | [ prefer-spy-on] [ ] | Suggest using ` jest.spyOn() ` | | ![ fixable-green] [ ] |
137
- | [ prefer-strict-equal] [ ] | Suggest using ` toStrictEqual() ` | | ![ fixable-green] [ ] |
138
- | [ prefer-to-be-null] [ ] | Suggest using ` toBeNull() ` | | ![ fixable-green] [ ] |
139
- | [ prefer-to-be-undefined] [ ] | Suggest using ` toBeUndefined() ` | | ![ fixable-green] [ ] |
140
- | [ prefer-to-contain] [ ] | Suggest using ` toContain() ` | | ![ fixable-green] [ ] |
141
- | [ prefer-to-have-length] [ ] | Suggest using ` toHaveLength() ` | | ![ fixable-green] [ ] |
142
- | [ prefer-todo] [ ] | Suggest using ` test.todo() ` | | ![ fixable-green] [ ] |
143
- | [ require-tothrow-message] [ ] | Require that ` toThrow() ` and ` toThrowError ` includes a message | | |
144
- | [ valid-describe] [ ] | Enforce valid ` describe() ` callback | ![ recommended] [ ] | |
145
- | [ valid-expect-in-promise] [ ] | Enforce having return statement when testing with promises | ![ recommended] [ ] | |
146
- | [ valid-expect] [ ] | Enforce valid ` expect() ` usage | ![ recommended] [ ] | |
107
+ | Rule | Description | Recommended | Fixable |
108
+ | ------------------------------ | ----------------------------------------------------------------- | ---------------- | ------------------- |
109
+ | [ consistent-test-it] [ ] | Enforce consistent test or it keyword | | ![ fixable-green] [ ] |
110
+ | [ expect-expect] [ ] | Enforce assertion to be made in a test body | | |
111
+ | [ lowercase-name] [ ] | Disallow capitalized test names | | ![ fixable-green] [ ] |
112
+ | [ no-alias-methods] [ ] | Disallow alias methods | ![ recommended] [ ] | ![ fixable-green] [ ] |
113
+ | [ no-commented-out-tests] [ ] | Disallow commented out tests | | |
114
+ | [ no-disabled-tests] [ ] | Disallow disabled tests | ![ recommended] [ ] | |
115
+ | [ no-duplicate-hooks] [ ] | Disallow duplicate hooks within a ` describe ` block | | |
116
+ | [ no-empty-title] [ ] | Disallow empty titles | | |
117
+ | [ no-expect-resolves] [ ] | Disallow using ` expect().resolves ` | | |
118
+ | [ no-export] [ ] | Disallow export from test files | | |
119
+ | [ no-focused-tests] [ ] | Disallow focused tests | ![ recommended] [ ] | |
120
+ | [ no-hooks] [ ] | Disallow setup and teardown hooks | | |
121
+ | [ no-identical-title] [ ] | Disallow identical titles | ![ recommended] [ ] | |
122
+ | [ no-if] [ ] | Disallow conditional logic | | |
123
+ | [ no-jasmine-globals] [ ] | Disallow Jasmine globals | ![ recommended] [ ] | ![ fixable-yellow] [ ] |
124
+ | [ no-jest-import] [ ] | Disallow importing ` jest ` | ![ recommended] [ ] | |
125
+ | [ no-large-snapshots] [ ] | Disallow large snapshots | | |
126
+ | [ no-mocks-import] [ ] | Disallow manually importing from ` __mocks__ ` | | |
127
+ | [ no-standalone-expect] [ ] | Prevents ` expect ` statements outside of a ` test ` or ` it ` block | | |
128
+ | [ no-test-callback] [ ] | Using a callback in asynchronous tests | | ![ fixable-green] [ ] |
129
+ | [ no-test-prefixes] [ ] | Disallow using ` f ` & ` x ` prefixes to define focused/skipped tests | ![ recommended] [ ] | ![ fixable-green] [ ] |
130
+ | [ no-test-return-statement] [ ] | Disallow explicitly returning from tests | | |
131
+ | [ no-truthy-falsy] [ ] | Disallow using ` toBeTruthy() ` & ` toBeFalsy() ` | | |
132
+ | [ no-try-expect] [ ] | Prevent ` catch ` assertions in tests | | |
133
+ | [ prefer-called-with] [ ] | Suggest using ` toBeCalledWith() ` OR ` toHaveBeenCalledWith() ` | | |
134
+ | [ prefer-expect-assertions] [ ] | Suggest using ` expect.assertions() ` OR ` expect.hasAssertions() ` | | |
135
+ | [ prefer-inline-snapshots] [ ] | Suggest using ` toMatchInlineSnapshot() ` | | ![ fixable-green] [ ] |
136
+ | [ prefer-spy-on] [ ] | Suggest using ` jest.spyOn() ` | | ![ fixable-green] [ ] |
137
+ | [ prefer-strict-equal] [ ] | Suggest using ` toStrictEqual() ` | | ![ fixable-green] [ ] |
138
+ | [ prefer-to-be-null] [ ] | Suggest using ` toBeNull() ` | | ![ fixable-green] [ ] |
139
+ | [ prefer-to-be-undefined] [ ] | Suggest using ` toBeUndefined() ` | | ![ fixable-green] [ ] |
140
+ | [ prefer-to-contain] [ ] | Suggest using ` toContain() ` | | ![ fixable-green] [ ] |
141
+ | [ prefer-to-have-length] [ ] | Suggest using ` toHaveLength() ` | | ![ fixable-green] [ ] |
142
+ | [ prefer-todo] [ ] | Suggest using ` test.todo() ` | | ![ fixable-green] [ ] |
143
+ | [ require-top-level-describe] [ ] | Require a top-level ` describe ` block | | |
144
+ | [ require-tothrow-message] [ ] | Require that ` toThrow() ` and ` toThrowError ` includes a message | | |
145
+ | [ valid-describe] [ ] | Enforce valid ` describe() ` callback | ![ recommended] [ ] | |
146
+ | [ valid-expect-in-promise] [ ] | Enforce having return statement when testing with promises | ![ recommended] [ ] | |
147
+ | [ valid-expect] [ ] | Enforce valid ` expect() ` usage | ![ recommended] [ ] | |
147
148
148
149
## Credit
149
150
@@ -193,6 +194,7 @@ https://github.com/dangreenisrael/eslint-plugin-jest-formatting
193
194
[ prefer-to-contain ] : docs/rules/prefer-to-contain.md
194
195
[ prefer-to-have-length ] : docs/rules/prefer-to-have-length.md
195
196
[ prefer-todo ] : docs/rules/prefer-todo.md
197
+ [ require-top-level-describe ] : docs/rules/require-top-level-describe.md
196
198
[ require-tothrow-message ] : docs/rules/require-tothrow-message.md
197
199
[ valid-describe ] : docs/rules/valid-describe.md
198
200
[ valid-expect-in-promise ] : docs/rules/valid-expect-in-promise.md
0 commit comments