@digest/jest 3.5.1 → 3.6.0
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/dist/jest.config.js +20 -13
- package/package.json +5 -5
package/dist/jest.config.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
7
7
|
const scripts_1 = require("@digest/scripts");
|
|
8
8
|
const babel = scripts_1.config.babel && scripts_1.config.jestBabel;
|
|
9
9
|
const cache = scripts_1.config.cache;
|
|
@@ -11,11 +11,16 @@ const emotion = scripts_1.config.emotion && scripts_1.config.jestEmotion;
|
|
|
11
11
|
const graphql = scripts_1.config.graphql && scripts_1.config.jestGraphQL;
|
|
12
12
|
const junit = scripts_1.config.jestJUnit;
|
|
13
13
|
const react = scripts_1.config.react && scripts_1.config.jestReact;
|
|
14
|
+
const reactNative = react && scripts_1.config.reactNative && scripts_1.config.babelReactNative;
|
|
15
|
+
const reactNativeWeb = reactNative && scripts_1.config.reactNativeWeb;
|
|
14
16
|
const reports = scripts_1.config.reports;
|
|
15
17
|
const typescript = scripts_1.config.typescript && scripts_1.config.jestTypeScript;
|
|
18
|
+
const babelPrepPath = babel ?
|
|
19
|
+
require.resolve('@digest/jest-babel/dist/babelPrep') :
|
|
20
|
+
undefined;
|
|
16
21
|
module.exports = {
|
|
17
22
|
cacheDirectory: cache ?
|
|
18
|
-
|
|
23
|
+
node_path_1.default.join(cache, 'jest') :
|
|
19
24
|
false,
|
|
20
25
|
collectCoverage: Boolean(reports),
|
|
21
26
|
collectCoverageFrom: [
|
|
@@ -47,7 +52,7 @@ module.exports = {
|
|
|
47
52
|
] :
|
|
48
53
|
[]),
|
|
49
54
|
coverageDirectory: reports ?
|
|
50
|
-
|
|
55
|
+
node_path_1.default.join(reports, 'coverage') :
|
|
51
56
|
undefined,
|
|
52
57
|
moduleDirectories: [
|
|
53
58
|
'node_modules',
|
|
@@ -61,9 +66,11 @@ module.exports = {
|
|
|
61
66
|
'ts',
|
|
62
67
|
'tsx'
|
|
63
68
|
],
|
|
64
|
-
moduleNameMapper: {
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
moduleNameMapper: Object.assign({ '\\.(css|scss|sass|less)$': 'identity-obj-proxy' }, reactNativeWeb ?
|
|
70
|
+
{
|
|
71
|
+
'^react-native$': 'react-native-web'
|
|
72
|
+
} :
|
|
73
|
+
{}),
|
|
67
74
|
reporters: [
|
|
68
75
|
'default'
|
|
69
76
|
].concat(reports && junit ?
|
|
@@ -84,7 +91,7 @@ module.exports = {
|
|
|
84
91
|
[]),
|
|
85
92
|
rootDir: process.cwd(),
|
|
86
93
|
setupFiles: [
|
|
87
|
-
require.resolve(
|
|
94
|
+
require.resolve(node_path_1.default.join('@digest', 'jest', 'share', 'setup.js'))
|
|
88
95
|
].concat(scripts_1.config.jestSetup ?
|
|
89
96
|
[
|
|
90
97
|
scripts_1.config.jestSetup
|
|
@@ -92,12 +99,12 @@ module.exports = {
|
|
|
92
99
|
[]),
|
|
93
100
|
setupFilesAfterEnv: [].concat(react ?
|
|
94
101
|
[
|
|
95
|
-
require.resolve(
|
|
102
|
+
require.resolve(node_path_1.default.join('@digest', 'jest-react', 'share', 'env.setup.js'))
|
|
96
103
|
] :
|
|
97
104
|
[]),
|
|
98
105
|
snapshotSerializers: [].concat(emotion ?
|
|
99
106
|
[
|
|
100
|
-
require.resolve(
|
|
107
|
+
require.resolve(node_path_1.default.join('@emotion', 'jest', 'serializer'))
|
|
101
108
|
] :
|
|
102
109
|
[]),
|
|
103
110
|
testEnvironment: 'node',
|
|
@@ -115,7 +122,7 @@ module.exports = {
|
|
|
115
122
|
'^.+\\.js$': [
|
|
116
123
|
'babel-jest',
|
|
117
124
|
{
|
|
118
|
-
configFile:
|
|
125
|
+
configFile: babelPrepPath
|
|
119
126
|
}
|
|
120
127
|
]
|
|
121
128
|
} :
|
|
@@ -124,7 +131,7 @@ module.exports = {
|
|
|
124
131
|
'^.+\\.jsx$': [
|
|
125
132
|
'babel-jest',
|
|
126
133
|
{
|
|
127
|
-
configFile:
|
|
134
|
+
configFile: babelPrepPath
|
|
128
135
|
}
|
|
129
136
|
]
|
|
130
137
|
} :
|
|
@@ -133,7 +140,7 @@ module.exports = {
|
|
|
133
140
|
'^.+\\.ts$': [
|
|
134
141
|
'babel-jest',
|
|
135
142
|
{
|
|
136
|
-
configFile:
|
|
143
|
+
configFile: babelPrepPath
|
|
137
144
|
}
|
|
138
145
|
]
|
|
139
146
|
} :
|
|
@@ -142,7 +149,7 @@ module.exports = {
|
|
|
142
149
|
'^.+\\.tsx$': [
|
|
143
150
|
'babel-jest',
|
|
144
151
|
{
|
|
145
|
-
configFile:
|
|
152
|
+
configFile: babelPrepPath
|
|
146
153
|
}
|
|
147
154
|
]
|
|
148
155
|
} :
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@digest/jest",
|
|
3
3
|
"title": "Jest Digest",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.6.0",
|
|
6
6
|
"description": "Digested Jest configurations",
|
|
7
7
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
8
8
|
"contributors": [
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"clean": "rimraf node_modules dist package-lock.json npm-debug.log"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@digest/scripts": "^3.
|
|
40
|
-
"jest": "^
|
|
41
|
-
"jest-environment-jsdom": "^
|
|
39
|
+
"@digest/scripts": "^3.6.0",
|
|
40
|
+
"jest": "^29.0.2",
|
|
41
|
+
"jest-environment-jsdom": "^29.0.2",
|
|
42
42
|
"jest-transform-stub": "^2.0.0"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"coverage",
|
|
49
49
|
"clover"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "6dbabfc3844f33f4b2864fd4273a2b630504830f"
|
|
52
52
|
}
|