-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjest.config.js
44 lines (42 loc) · 978 Bytes
/
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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
const { cwd } = process;
module.exports = {
clearMocks: true,
collectCoverage: true,
coverageReporters: [
'json',
['text', { skipFull: true }]
],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'/themes/',
'/dist/',
'/.build/'
],
collectCoverageFrom: [
'<rootDir>/src/**/*.tsx',
'!<rootDir>/src/**/index.ts',
'!<rootDir>/src/**/*.story.tsx',
'!<rootDir>/src/**/stories.tsx',
],
errorOnDeprecated: true,
moduleFileExtensions: [
'js',
'ts',
'tsx'
],
roots: [
`<rootDir>/src`
],
setupFilesAfterEnv: [
'<rootDir>/.build/jest/setupTestEnv.js'
],
testEnvironment: 'jsdom',
transform: {
'.(ts)': 'ts-jest'
}
}