forked from ybrusentsov/react-international-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
28 lines (26 loc) · 816 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
import { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
preset: 'ts-jest',
roots: ['<rootDir>/src'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(scss|sass|css)$': 'identity-obj-proxy',
},
collectCoverageFrom: [
'<rootDir>/src/components/**/*.{ts,tsx}',
'<rootDir>/src/hooks/**/*.{ts,tsx}',
'<rootDir>/src/utils/**/*.{ts,tsx}',
'<rootDir>/src/style/**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/*stories.{ts,tsx}',
'!<rootDir>/src/utils/test-utils.ts',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testTimeout: 100000,
};
export default config;