/
jest.config.js
53 lines (53 loc) · 1.42 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module.exports = {
collectCoverage: true,
clearMocks: true,
coverageReporters: [
"lcov"
],
modulePathIgnorePatterns: [
"<rootDir>/packages/*.*/dist/*.*",
"<rootDir>/packages/*.*/public/*.*",
"<rootDir>/packages/*.*/.cache/*.*"
],
coveragePathIgnorePatterns: [
"<rootDir>/packages/*.*/dist/*.*",
"<rootDir>/packages/*.*/examples/*.*",
"<rootDir>/packages/*.docs.*",
"<rootDir>/packages/react-docs/*.*"
],
modulePaths: [
"<rootDir>/**/node_modules/",
"<rootDir>/packages/",
"<rootDir>/packages/patternfly-3/",
"<rootDir>/packages/patternfly-4/"
],
roots: [
"<rootDir>/packages"
],
setupFiles: [
"./test.env.js"
],
snapshotSerializers: [
"enzyme-to-json/serializer",
"<rootDir>/packages/patternfly-4/react-core/build/snapshot-serializer"
],
transform: {
"^.+\\.(ts|tsx)?$": "ts-jest",
"^.+\\.jsx?$": "babel-jest",
"\\.(css)$": "<rootDir>/packages/patternfly-4/react-styles/jest-transform.js"
},
testPathIgnorePatterns: [
"<rootDir>/scripts/generators/",
"<rootDir>/packages/patternfly-4/react-integration/"
],
transformIgnorePatterns: [
"node_modules/(?!@patternfly|@novnc|tippy.js)"
],
// https://github.com/kulshekhar/ts-jest/blob/master/docs/user/config/index.md
preset: "ts-jest/presets/js-with-babel",
globals: {
"ts-jest": {
tsConfig: "packages/patternfly-4/react-core/tsconfig.jest.json"
}
}
};