-
Notifications
You must be signed in to change notification settings - Fork 31
/
jest.config.js
40 lines (40 loc) · 1.35 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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.(t|j)sx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
},
],
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!query-string/)'],
testEnvironment: './test/test-utils/env',
collectCoverage: true,
coverageProvider: 'v8',
coverageReporters: ['text-summary', 'lcov'],
coverageThreshold: {
global: {
lines: 15,
},
},
testTimeout: 30000,
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(test).[jt]s?(x)'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!*.test.{ts,tsx}', '!*.stories.*'],
coveragePathIgnorePatterns: [
'<rootDir>/src/marketplace/components/deprecated',
'<rootDir>/src/marketplace/modules/deprecated/',
'/types/',
'/tests/',
],
moduleNameMapper: {
'\\.svg$': '<rootDir>/test/test-utils/fileMock.ts',
'\\.(css|md)$': 'identity-obj-proxy',
'\\.png$': '<rootDir>/scripts/emptyObject',
'\\~/config/(.*).toml$': '<rootDir>/test/test-config/$1.ts',
'\\~/(.*)$': '<rootDir>/src/$1',
'\\$testUtils/(.*)$': '<rootDir>/test/test-utils/$1',
},
setupFilesAfterEnv: ['<rootDir>/test/test-utils/setupTests.ts'],
}