-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
46 lines (44 loc) · 1.15 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import type {InitialOptionsTsJest} from 'ts-jest';
const config: InitialOptionsTsJest = {
clearMocks: true,
collectCoverageFrom: ['<rootDir>/**/*.{ts,tsx}', '!<rootDir>/**/index.ts'],
coverageDirectory: '../coverage',
coveragePathIgnorePatterns: [
'../node_modules/',
'../dist/',
'../storybook-static/',
'../stories/',
'../.storybook/',
'<rootDir>/colors/',
'<rootDir>/icons/',
'<rootDir>/lab/',
'<rootDir>/styles/',
],
coverageReporters: ['text', 'lcov'],
errorOnDeprecated: true,
globals: {
Uint8Array,
'ts-jest': {
babelConfig: false,
tsconfig: 'tsconfig.test.json',
diagnostics: true,
},
},
moduleDirectories: ['node_modules', 'styles', '<rootDir>'],
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
moduleNameMapper: {
'\\.css$': 'identity-obj-proxy',
},
rootDir: 'src',
setupFilesAfterEnv: ['../jest.setup.ts'],
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
testMatch: ['**/*.test.[tj]s?(x)'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
verbose: true,
testTimeout: 30000,
reporters: ['default'],
};
export default config;