Skip to content

Commit 85afee8

Browse files
jpinsonneaujotak
authored andcommitted
fix jest and put config in a separate file
1 parent 823224e commit 85afee8

File tree

3 files changed

+9451
-4381
lines changed

3 files changed

+9451
-4381
lines changed

web/jest.config.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
3+
import type { Config } from 'jest';
4+
5+
const config: Config = {
6+
verbose: true,
7+
collectCoverage: true,
8+
coverageReporters: [
9+
"cobertura"
10+
],
11+
maxWorkers: 1,
12+
globals: {
13+
"ts-jest": {
14+
"isolatedModules": true
15+
}
16+
},
17+
setupFiles: [
18+
"<rootDir>/enzyme.config.ts"
19+
],
20+
setupFilesAfterEnv: [
21+
"<rootDir>setup-tests.tsx"
22+
],
23+
preset: "ts-jest",
24+
moduleFileExtensions: [
25+
"js",
26+
"jsx",
27+
"ts",
28+
"tsx"
29+
],
30+
modulePathIgnorePatterns: [
31+
"cypress"
32+
],
33+
moduleNameMapper: {
34+
"\\.(css|less)$": "<rootDir>/moduleMapper/dummy.tsx",
35+
"@console/*": "<rootDir>/moduleMapper/dummy.tsx"
36+
},
37+
transform: {
38+
"^.+\\.[t|j]sx?$": "ts-jest"
39+
},
40+
transformIgnorePatterns: [
41+
"<rootDir>/node_modules/(?!(@patternfly|@openshift-console|@spice-project|d3.*|internmap|delaunator|robust-predicates\\S*?)/.*)"
42+
],
43+
resolver: "ts-jest-resolver"
44+
};
45+
46+
export default config;

0 commit comments

Comments
 (0)