eslint-plugin-jest 29.2.0 → 29.2.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/no-export.js
CHANGED
|
@@ -38,7 +38,7 @@ var _default = exports.default = (0, _utils2.createRule)({
|
|
|
38
38
|
hasTestCase = true;
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
'ExportNamedDeclaration, ExportDefaultDeclaration'(node) {
|
|
41
|
+
'ExportNamedDeclaration, ExportDefaultDeclaration, TSExportAssignment'(node) {
|
|
42
42
|
exportNodes.push(node);
|
|
43
43
|
},
|
|
44
44
|
'AssignmentExpression > MemberExpression'(node) {
|
|
@@ -17,7 +17,7 @@ var _default = exports.default = (0, _utils2.createRule)({
|
|
|
17
17
|
description: 'Disallow mocking of non-existing module paths'
|
|
18
18
|
},
|
|
19
19
|
messages: {
|
|
20
|
-
invalidMockModulePath: 'Module path {{ moduleName }} does not exist'
|
|
20
|
+
invalidMockModulePath: 'Module path {{ moduleName }} does not exist or is not exported'
|
|
21
21
|
},
|
|
22
22
|
schema: [{
|
|
23
23
|
type: 'object',
|
|
@@ -73,7 +73,7 @@ var _default = exports.default = (0, _utils2.createRule)({
|
|
|
73
73
|
|
|
74
74
|
// Reports unexpected issues when attempt to verify mocked module path.
|
|
75
75
|
// The list of possible errors is non-exhaustive.
|
|
76
|
-
if (castedErr.code !== 'MODULE_NOT_FOUND') {
|
|
76
|
+
if (castedErr.code !== 'MODULE_NOT_FOUND' && castedErr.code !== 'ERR_PACKAGE_PATH_NOT_EXPORTED') {
|
|
77
77
|
throw new Error(`Error when trying to validate mock module path from \`jest.mock\`: ${err}`);
|
|
78
78
|
}
|
|
79
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-jest",
|
|
3
|
-
"version": "29.2.
|
|
3
|
+
"version": "29.2.2",
|
|
4
4
|
"description": "ESLint rules for Jest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"optional": true
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
|
-
"packageManager": "yarn@4.
|
|
137
|
+
"packageManager": "yarn@4.12.0",
|
|
138
138
|
"engines": {
|
|
139
139
|
"node": "^20.12.0 || ^22.0.0 || >=24.0.0"
|
|
140
140
|
}
|