forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (31 loc) · 958 Bytes
/
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
module.exports = {
collectCoverage: true,
coverageReporters: ['lcov'],
clearMocks: true,
modulePathIgnorePatterns: [
'<rootDir>/packages/*.*/dist/*.*',
'<rootDir>/packages/*.*/public/*.*',
'<rootDir>/packages/*.*/.cache/*.*'
],
roots: ['<rootDir>/packages'],
setupFiles: ['<rootDir>/jest.env.js'],
snapshotSerializers: [
'enzyme-to-json/serializer',
],
transform: {
'^.+\\.(ts|tsx?)$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
'\\.(css)$': '<rootDir>/packages/patternfly-4/react-styles/jest-transform.js'
},
transformIgnorePatterns: ['node_modules/(?!@patternfly|@novnc|tippy.js|lodash)'],
testPathIgnorePatterns: [
'<rootDir>/packages/patternfly-4/react-integration/',
],
// 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/tsconfig.jest.json'
}
}
};