forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
32 lines (30 loc) · 1.02 KB
/
jest.config.ts
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
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import type { Config } from 'jest';
const config: Config = {
collectCoverage: true,
coverageReporters: ['lcov'],
clearMocks: true,
testMatch: ['**/__tests__/**/*.{js,ts}?(x)', '**/*.test.{js,ts}?(x)'],
modulePathIgnorePatterns: [
'<rootDir>/packages/*.*/dist/*.*',
'<rootDir>/packages/*.*/public/*.*',
'<rootDir>/packages/*.*/.cache/*.*'
],
roots: ['<rootDir>/packages'],
transform: {
'^.+\\.m?[jt]sx?$': 'babel-jest',
'^.+\\.svg$': 'jest-transform-stub'
},
setupFilesAfterEnv: ['<rootDir>/packages/testSetup.ts'],
testPathIgnorePatterns: ['<rootDir>/packages/react-integration/'],
transformIgnorePatterns: ['node_modules/victory-*/', '/node_modules/(?!(case-anything)/)'],
coveragePathIgnorePatterns: ['/dist/'],
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/packages/react-styles/__mocks__/styleMock.js'
},
testEnvironment: 'jsdom'
};
export default config;