-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
46 lines (45 loc) · 1.09 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
const TEST_THEME = require('./.jest/globals/testTheme');
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
verbose: true,
resolver: '<rootDir>/.jest/resolver.js',
setupFilesAfterEnv: ['<rootDir>/.jest/setupFilesAfterEnv.ts'],
testPathIgnorePatterns: [
'<rootDir>/packages/(?:.+?)/lib/',
'<rootDir>/packages/(?:.+?)/.cache/',
'<rootDir>/packages/core/',
],
coveragePathIgnorePatterns: [
'<rootDir>/packages/(?:.+?)/lib/',
'<rootDir>/packages/core/',
],
transformIgnorePatterns: ['node_modules/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)?$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
isolatedModules: true,
},
],
},
coverageDirectory: '.jest/coverage',
coverageReporters: ['html', 'text'],
coverageThreshold: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50,
},
},
globals: {
TEST_THEME,
},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};