@digest/jest 4.1.6 → 4.2.1
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/package.json +5 -4
- package/share/setup.js +12 -10
- package/dist/jest.config.d.ts +0 -1
- package/dist/jest.config.js +0 -161
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": "4.1
|
|
5
|
+
"version": "4.2.1",
|
|
6
6
|
"description": "Digested Jest configurations",
|
|
7
7
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
8
8
|
"contributors": [
|
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
"build": "tsc",
|
|
34
34
|
"lint": "run-p lint:es",
|
|
35
35
|
"lint:es": "eslint 'src/**/*.[jt]s?(x)' --ignore-pattern 'src/**/*.(d.ts|json)'",
|
|
36
|
-
"clean": "rimraf node_modules dist package-lock.json npm-debug.log"
|
|
36
|
+
"clean": "rimraf node_modules dist package-lock.json npm-debug.log",
|
|
37
|
+
"set:version": "npm version --allow-same-version --no-commit-hooks --no-git-tag-version --no-workspaces-update $(npm --silent view $(node -p \"require('./package.json').name\") version)"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@digest/scripts": "^4.
|
|
40
|
+
"@digest/scripts": "^4.0.0",
|
|
40
41
|
"jest": "^29.5.0",
|
|
41
42
|
"jest-environment-jsdom": "^29.5.0",
|
|
42
43
|
"jest-transform-stub": "^2.0.0"
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"coverage",
|
|
49
50
|
"clover"
|
|
50
51
|
],
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "8177f7ab8957fdc57fae277bfcde02811ee6a9fd"
|
|
52
53
|
}
|
package/share/setup.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/*
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This file is part of the Node Digest.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
terms of the GNU General Public License as published by the Free
|
|
7
|
-
version
|
|
5
|
+
Node Digest is free software: you can redistribute it and/or modify it under
|
|
6
|
+
the terms of the GNU Lesser General Public License as published by the Free
|
|
7
|
+
Software Foundation, either version 3 of the License, or (at your option)
|
|
8
|
+
any later version.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11
|
-
PARTICULAR PURPOSE.
|
|
12
|
-
|
|
13
|
-
program. If not, see <http://www.gnu.org/licenses/>.
|
|
10
|
+
Node Digest is distributed in the hope that it will be useful, but WITHOUT
|
|
11
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
12
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
13
|
+
for more details.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
16
|
+
along with Node Digest . If not, see <https://www.gnu.org/licenses/>.
|
|
16
17
|
|
|
18
|
+
*/
|
|
17
19
|
// For async tests, catch all errors here so we don't have to try / catch
|
|
18
20
|
// everywhere for safety
|
|
19
21
|
process.on(
|
package/dist/jest.config.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/jest.config.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const scripts_1 = require("@digest/scripts");
|
|
7
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const babel = scripts_1.config.babel && scripts_1.config.jestBabel;
|
|
9
|
-
const cache = scripts_1.config.cache;
|
|
10
|
-
const emotion = scripts_1.config.emotion && scripts_1.config.jestEmotion;
|
|
11
|
-
const graphql = scripts_1.config.graphql && scripts_1.config.jestGraphQL;
|
|
12
|
-
const junit = scripts_1.config.jestJUnit;
|
|
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;
|
|
16
|
-
const reports = scripts_1.config.reports;
|
|
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;
|
|
21
|
-
module.exports = {
|
|
22
|
-
cacheDirectory: cache ?
|
|
23
|
-
node_path_1.default.join(cache, 'jest') :
|
|
24
|
-
false,
|
|
25
|
-
collectCoverage: Boolean(reports),
|
|
26
|
-
collectCoverageFrom: [
|
|
27
|
-
'src/**/*.js',
|
|
28
|
-
'demo/**/*.js',
|
|
29
|
-
'packages/**/*.js',
|
|
30
|
-
'!**/__e2e__/**/*',
|
|
31
|
-
'!**/__tests__/**/*'
|
|
32
|
-
].concat(react ?
|
|
33
|
-
[
|
|
34
|
-
'src/**/*.jsx',
|
|
35
|
-
'demo/**/*.jsx',
|
|
36
|
-
'packages/**/*.jsx'
|
|
37
|
-
] :
|
|
38
|
-
[], typescript ?
|
|
39
|
-
[
|
|
40
|
-
'src/**/*.ts',
|
|
41
|
-
'demo/**/*.ts',
|
|
42
|
-
'packages/**/*.ts',
|
|
43
|
-
'!src/**/*.d.ts',
|
|
44
|
-
'!demo/**/*.d.ts',
|
|
45
|
-
'!packages/**/*.d.ts'
|
|
46
|
-
] :
|
|
47
|
-
[], react && typescript ?
|
|
48
|
-
[
|
|
49
|
-
'src/**/*.tsx',
|
|
50
|
-
'demo/**/*.tsx',
|
|
51
|
-
'packages/**/*.tsx'
|
|
52
|
-
] :
|
|
53
|
-
[]),
|
|
54
|
-
coverageDirectory: reports ?
|
|
55
|
-
node_path_1.default.join(reports, 'coverage') :
|
|
56
|
-
undefined,
|
|
57
|
-
moduleDirectories: [
|
|
58
|
-
'node_modules',
|
|
59
|
-
'<rootDir>',
|
|
60
|
-
process.cwd()
|
|
61
|
-
],
|
|
62
|
-
moduleFileExtensions: [
|
|
63
|
-
'json',
|
|
64
|
-
'js',
|
|
65
|
-
'jsx',
|
|
66
|
-
'ts',
|
|
67
|
-
'tsx'
|
|
68
|
-
],
|
|
69
|
-
moduleNameMapper: Object.assign({ '\\.(css|scss|sass|less)$': 'identity-obj-proxy' }, reactNativeWeb ?
|
|
70
|
-
{
|
|
71
|
-
'^react-native$': 'react-native-web'
|
|
72
|
-
} :
|
|
73
|
-
{}),
|
|
74
|
-
reporters: [
|
|
75
|
-
'default'
|
|
76
|
-
].concat(reports && junit ?
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
'jest-junit',
|
|
80
|
-
{
|
|
81
|
-
ancestorSeparator: ' › ',
|
|
82
|
-
classNameTemplate: '{classname}',
|
|
83
|
-
outputDirectory: reports,
|
|
84
|
-
outputName: 'junit.xml',
|
|
85
|
-
suiteName: 'jest tests',
|
|
86
|
-
titleTemplate: '{title}',
|
|
87
|
-
usePathForSuiteName: 'true'
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
] :
|
|
91
|
-
[]),
|
|
92
|
-
rootDir: process.cwd(),
|
|
93
|
-
setupFiles: [
|
|
94
|
-
require.resolve(node_path_1.default.join('@digest', 'jest', 'share', 'setup.js'))
|
|
95
|
-
].concat(scripts_1.config.jestSetup ?
|
|
96
|
-
[
|
|
97
|
-
scripts_1.config.jestSetup
|
|
98
|
-
] :
|
|
99
|
-
[]),
|
|
100
|
-
setupFilesAfterEnv: [].concat(react ?
|
|
101
|
-
[
|
|
102
|
-
require.resolve(node_path_1.default.join('@digest', 'jest-react', 'share', 'env.setup.js'))
|
|
103
|
-
] :
|
|
104
|
-
[]),
|
|
105
|
-
snapshotSerializers: [].concat(emotion ?
|
|
106
|
-
[
|
|
107
|
-
require.resolve(node_path_1.default.join('@emotion', 'jest', 'serializer'))
|
|
108
|
-
] :
|
|
109
|
-
[]),
|
|
110
|
-
testEnvironment: 'node',
|
|
111
|
-
testPathIgnorePatterns: [
|
|
112
|
-
'//node_modules//',
|
|
113
|
-
'//lib//',
|
|
114
|
-
'//public//',
|
|
115
|
-
'//static//',
|
|
116
|
-
'//bin//',
|
|
117
|
-
'.d.ts$'
|
|
118
|
-
],
|
|
119
|
-
testRegex: '(__tests__[\\\/\\\\].*|\\.(test|spec))\\.(j|t)sx?$',
|
|
120
|
-
transform: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)(\\?v=[0-9]\\.[0-9]\\.[0-9])?$': 'jest-transform-stub' }, babel ?
|
|
121
|
-
{
|
|
122
|
-
'^.+\\.js$': [
|
|
123
|
-
'babel-jest',
|
|
124
|
-
{
|
|
125
|
-
configFile: babelPrepPath
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
} :
|
|
129
|
-
{}), babel && react ?
|
|
130
|
-
{
|
|
131
|
-
'^.+\\.jsx$': [
|
|
132
|
-
'babel-jest',
|
|
133
|
-
{
|
|
134
|
-
configFile: babelPrepPath
|
|
135
|
-
}
|
|
136
|
-
]
|
|
137
|
-
} :
|
|
138
|
-
{}), babel && typescript ?
|
|
139
|
-
{
|
|
140
|
-
'^.+\\.ts$': [
|
|
141
|
-
'babel-jest',
|
|
142
|
-
{
|
|
143
|
-
configFile: babelPrepPath
|
|
144
|
-
}
|
|
145
|
-
]
|
|
146
|
-
} :
|
|
147
|
-
{}), babel && react && typescript ?
|
|
148
|
-
{
|
|
149
|
-
'^.+\\.tsx$': [
|
|
150
|
-
'babel-jest',
|
|
151
|
-
{
|
|
152
|
-
configFile: babelPrepPath
|
|
153
|
-
}
|
|
154
|
-
]
|
|
155
|
-
} :
|
|
156
|
-
{}), babel && graphql ?
|
|
157
|
-
{
|
|
158
|
-
'^.+\\.(gql|graphql)$': 'jest-transform-graphql'
|
|
159
|
-
} :
|
|
160
|
-
{})
|
|
161
|
-
};
|