forked from gilbarbara/react-spotify-web-playback
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
38 lines (38 loc) · 949 Bytes
/
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
module.exports = {
collectCoverage: false,
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
coverageThreshold: {
global: {
branches: 75,
functions: 90,
lines: 90,
statements: 90,
},
},
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/src/$1',
},
preset: 'ts-jest',
setupFiles: ['<rootDir>/test/__setup__/setupFiles.ts'],
setupFilesAfterEnv: ['<rootDir>/test/__setup__/setupFilesAfterEnv.ts'],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
resources: 'usable',
url: 'http://localhost:3000/',
},
testRegex: '/test/.*?\\.(test|spec)\\.tsx?$',
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'test/tsconfig.json',
diagnostics: {
ignoreCodes: ['TS151001'],
},
},
],
},
verbose: false,
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
};