eslint-plugin-jest 27.4.1 → 27.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/rules/max-expects.js +1 -1
- package/lib/rules/max-nested-describe.js +1 -1
- package/lib/rules/no-export.js +1 -1
- package/lib/rules/no-focused-tests.js +2 -2
- package/lib/rules/no-identical-title.js +2 -2
- package/lib/rules/no-if.js +1 -1
- package/lib/rules/no-mocks-import.js +1 -1
- package/lib/rules/no-standalone-expect.js +1 -1
- package/lib/rules/no-test-return-statement.js +1 -1
- package/lib/rules/prefer-expect-resolves.js +1 -1
- package/lib/rules/prefer-spy-on.js +1 -1
- package/lib/rules/valid-expect.js +7 -7
- package/lib/rules/valid-title.js +1 -1
- package/package.json +2 -2
package/lib/rules/max-expects.js
CHANGED
|
@@ -15,7 +15,7 @@ var _default = (0, _utils2.createRule)({
|
|
|
15
15
|
recommended: false
|
|
16
16
|
},
|
|
17
17
|
messages: {
|
|
18
|
-
exceededMaxAssertion: 'Too many assertion calls ({{ count }})
|
|
18
|
+
exceededMaxAssertion: 'Too many assertion calls ({{ count }}) - maximum allowed is {{ max }}'
|
|
19
19
|
},
|
|
20
20
|
type: 'suggestion',
|
|
21
21
|
schema: [{
|
|
@@ -14,7 +14,7 @@ var _default = (0, _utils.createRule)({
|
|
|
14
14
|
recommended: false
|
|
15
15
|
},
|
|
16
16
|
messages: {
|
|
17
|
-
exceededMaxDepth: 'Too many nested describe calls ({{ depth }})
|
|
17
|
+
exceededMaxDepth: 'Too many nested describe calls ({{ depth }}) - maximum allowed is {{ max }}'
|
|
18
18
|
},
|
|
19
19
|
type: 'suggestion',
|
|
20
20
|
schema: [{
|
package/lib/rules/no-export.js
CHANGED
|
@@ -15,8 +15,8 @@ var _default = (0, _utils2.createRule)({
|
|
|
15
15
|
recommended: 'error'
|
|
16
16
|
},
|
|
17
17
|
messages: {
|
|
18
|
-
focusedTest: 'Unexpected focused test
|
|
19
|
-
suggestRemoveFocus: 'Remove focus from test
|
|
18
|
+
focusedTest: 'Unexpected focused test',
|
|
19
|
+
suggestRemoveFocus: 'Remove focus from test'
|
|
20
20
|
},
|
|
21
21
|
schema: [],
|
|
22
22
|
type: 'suggestion',
|
|
@@ -18,8 +18,8 @@ var _default = (0, _utils.createRule)({
|
|
|
18
18
|
recommended: 'error'
|
|
19
19
|
},
|
|
20
20
|
messages: {
|
|
21
|
-
multipleTestTitle: 'Test title is used multiple times in the same describe block
|
|
22
|
-
multipleDescribeTitle: 'Describe block title is used multiple times in the same describe block
|
|
21
|
+
multipleTestTitle: 'Test title is used multiple times in the same describe block',
|
|
22
|
+
multipleDescribeTitle: 'Describe block title is used multiple times in the same describe block'
|
|
23
23
|
},
|
|
24
24
|
schema: [],
|
|
25
25
|
type: 'suggestion'
|
package/lib/rules/no-if.js
CHANGED
|
@@ -22,7 +22,7 @@ var _default = (0, _utils2.createRule)({
|
|
|
22
22
|
recommended: false
|
|
23
23
|
},
|
|
24
24
|
messages: {
|
|
25
|
-
conditionalInTest: 'Test should not contain {{ condition }} statements
|
|
25
|
+
conditionalInTest: 'Test should not contain {{ condition }} statements'
|
|
26
26
|
},
|
|
27
27
|
deprecated: true,
|
|
28
28
|
replacedBy: ['no-conditional-in-test'],
|
|
@@ -19,7 +19,7 @@ var _default = (0, _utils.createRule)({
|
|
|
19
19
|
recommended: 'error'
|
|
20
20
|
},
|
|
21
21
|
messages: {
|
|
22
|
-
noManualImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`jest.mock\` and import from the original module path
|
|
22
|
+
noManualImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`jest.mock\` and import from the original module path`
|
|
23
23
|
},
|
|
24
24
|
schema: []
|
|
25
25
|
},
|
|
@@ -63,13 +63,13 @@ var _default = (0, _utils2.createRule)({
|
|
|
63
63
|
recommended: 'error'
|
|
64
64
|
},
|
|
65
65
|
messages: {
|
|
66
|
-
tooManyArgs: 'Expect takes at most {{ amount }} argument{{ s }}
|
|
67
|
-
notEnoughArgs: 'Expect requires at least {{ amount }} argument{{ s }}
|
|
68
|
-
modifierUnknown: 'Expect has an unknown modifier
|
|
69
|
-
matcherNotFound: 'Expect must have a corresponding matcher call
|
|
70
|
-
matcherNotCalled: 'Matchers must be called to assert
|
|
71
|
-
asyncMustBeAwaited: 'Async assertions must be awaited{{ orReturned }}
|
|
72
|
-
promisesWithAsyncAssertionsMustBeAwaited: 'Promises which return async assertions must be awaited{{ orReturned }}
|
|
66
|
+
tooManyArgs: 'Expect takes at most {{ amount }} argument{{ s }}',
|
|
67
|
+
notEnoughArgs: 'Expect requires at least {{ amount }} argument{{ s }}',
|
|
68
|
+
modifierUnknown: 'Expect has an unknown modifier',
|
|
69
|
+
matcherNotFound: 'Expect must have a corresponding matcher call',
|
|
70
|
+
matcherNotCalled: 'Matchers must be called to assert',
|
|
71
|
+
asyncMustBeAwaited: 'Async assertions must be awaited{{ orReturned }}',
|
|
72
|
+
promisesWithAsyncAssertionsMustBeAwaited: 'Promises which return async assertions must be awaited{{ orReturned }}'
|
|
73
73
|
},
|
|
74
74
|
type: 'suggestion',
|
|
75
75
|
schema: [{
|
package/lib/rules/valid-title.js
CHANGED
|
@@ -58,7 +58,7 @@ var _default = (0, _utils2.createRule)({
|
|
|
58
58
|
emptyTitle: '{{ jestFunctionName }} should not have an empty title',
|
|
59
59
|
duplicatePrefix: 'should not have duplicate prefix',
|
|
60
60
|
accidentalSpace: 'should not have leading or trailing spaces',
|
|
61
|
-
disallowedWord: '"{{ word }}" is not allowed in test titles
|
|
61
|
+
disallowedWord: '"{{ word }}" is not allowed in test titles',
|
|
62
62
|
mustNotMatch: '{{ jestFunctionName }} should not match {{ pattern }}',
|
|
63
63
|
mustMatch: '{{ jestFunctionName }} should match {{ pattern }}',
|
|
64
64
|
mustNotMatchCustom: '{{ message }}',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-jest",
|
|
3
|
-
"version": "27.4.
|
|
3
|
+
"version": "27.4.2",
|
|
4
4
|
"description": "ESLint rules for Jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"pinst": "^3.0.0",
|
|
136
136
|
"prettier": "^3.0.0",
|
|
137
137
|
"rimraf": "^5.0.0",
|
|
138
|
-
"semantic-release": "^
|
|
138
|
+
"semantic-release": "^22.0.0",
|
|
139
139
|
"semver": "^7.3.5",
|
|
140
140
|
"ts-node": "^10.2.1",
|
|
141
141
|
"typescript": "^5.0.4"
|