forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
46 lines (46 loc) · 1.44 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
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/scripts/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/',
'<rootDir>/node_modules/(?!lodash/.*)'
],
transformIgnorePatterns: ['node_modules/(?!@patternfly|@novnc|tippy.js|lodash)'],
// 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'
}
}
};