-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
51 lines (41 loc) · 1.23 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const config = {
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: [
'node_modules',
'./spec/javascripts',
],
// An array of file extensions your modules use
moduleFileExtensions: [
'js',
'mjs',
'cjs',
'jsx',
'ts',
'tsx',
'json',
'node',
],
// A preset that is used as a base for Jest's configuration
preset: 'ts-jest',
// Config for jest-fetch-mock
automock: false,
resetMocks: false,
setupFilesAfterEnv: ['jest-fetch-mock'],
// A list of paths to directories that Jest should use to search for files in
roots: [
'./spec/javascripts',
],
// The test environment that will be used for testing
testEnvironment: 'jest-environment-jsdom',
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.(js|jsx)$': 'babel-jest',
},
};
module.exports = config;