forked from testing-library/user-event
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
32 lines (22 loc) · 852 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
const config = require('kcd-scripts/jest')
config.roots = ['<rootDir>']
config.moduleNameMapper = {
'^#src$': '<rootDir>/src/index',
'^#src/(.*)$': '<rootDir>/src/$1',
'^#testHelpers$': '<rootDir>/tests/_helpers/index',
}
config.testEnvironment = 'jsdom'
config.setupFilesAfterEnv = [
'<rootDir>/testenv/jest.js',
]
config.testMatch.push('<rootDir>/tests/**/*.+(js|jsx|ts|tsx)')
// Ignore files/dirs starting with an underscore (setup, helper, ...)
// unless the file ends on `.test.{type}` so that we can add tests of our test utilities.
config.testPathIgnorePatterns.push('/_.*(?<!\\.test\\.[jt]sx?)$')
// Ignore declaration files
config.testPathIgnorePatterns.push('\\.d\\.ts$')
config.snapshotSerializers = [
require.resolve('jest-snapshot-serializer-raw/always'),
]
config.coverageThreshold = undefined
module.exports = config