-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.js
37 lines (37 loc) · 930 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
const config = {
verbose: true,
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/**/*.d.ts',
],
globalSetup: '<rootDir>/config/jest/globalSetup.js',
setupFiles: [],
setupFilesAfterEnv: [],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}',
],
testEnvironmentOptions: {
resources: 'usable',
},
transform: {
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest',
'^(?!.*\\.(js|jsx|ts|tsx|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$',
],
moduleFileExtensions: [
'js',
'ts',
'tsx',
'json',
'jsx',
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};
module.exports = config;