-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
49 lines (49 loc) · 995 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
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = {
roots: [
'./app/javascript/'
],
clearMocks: true,
restoreMocks: true,
resetMocks: true,
collectCoverageFrom: [
'**/*.{ts,tsx}',
'!**/*.d.ts',
'!types/*.ts',
'!packs/*.tsx',
'!coverage/**/*',
'!constants/*.ts'
],
moduleDirectories: [
'node_modules',
'<rootDir>'
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'json',
'node'
],
setupFilesAfterEnv: [
'./app/javascript/src/setup_tests.ts'
],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest'
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$'
],
testMatch: [
'<rootDir>/**/__tests__/**/*.{ts,tsx}',
'<rootDir>/**/*.{spec,test}.{js,jsx,ts,tsx}'
],
testPathIgnorePatterns: [
'/node_modules/',
'/config/webpack/'
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};