-
Notifications
You must be signed in to change notification settings - Fork 8
/
jest.config.js
24 lines (21 loc) · 719 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
module.exports = {
preset: 'ts-jest',
roots: ['<rootDir>/src'],
moduleDirectories: ['node_modules', 'src'],
transform: {
'^.+\\.tsx$': 'ts-jest',
'^.+\\.ts$': 'ts-jest',
},
testRegex: '(/__tests__/.*.(test|spec)).(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx,js,jsx}'],
coverageDirectory: '<rootDir>/coverage/',
verbose: true,
testTimeout: 30000,
testEnvironment: 'jsdom',
coveragePathIgnorePatterns: ['<rootDir>/node_modules/', '(.*).d.ts$'],
moduleNameMapper: {
'^.+\\.module\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2|svg)$': 'identity-obj-proxy',
},
};