-
Notifications
You must be signed in to change notification settings - Fork 14
/
jest.config.js
31 lines (31 loc) · 1.06 KB
/
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
module.exports = {
verbose: true,
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
rootDir: '.',
transform: {
'^.+\\.tsx?$': ['ts-jest', {tsconfig: './tsconfig.test.json'}],
},
transformIgnorePatterns: ['node_modules/(?!(@gravity-ui|react-github-btn|tinygesture)/)'],
coverageDirectory: './coverage',
collectCoverageFrom: [
'src/blocks/**/*.{ts,tsx,js,jsx}',
'src/components/**/*.{ts,tsx,js,jsx}',
'src/containers/**/*.{ts,tsx,js,jsx}',
'!**/__stories__/**/*',
'!**/*/*.stories.{ts,tsx}',
],
testEnvironment: '<rootDir>/test-utils/custom-environment.ts',
setupFiles: ['<rootDir>/test-utils/setup-tests.ts'],
setupFilesAfterEnv: ['<rootDir>/test-utils/setup-tests-after.ts'],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'jest-transform-css',
},
testMatch: ['**/*.test.[jt]s?(x)'],
testPathIgnorePatterns: [
'<rootDir>/node_modules',
'<rootDir>/build',
'<rootDir>/server',
'<rootDir>/.storybook',
'.visual.',
],
};