-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.js
55 lines (41 loc) · 1.76 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
52
53
54
55
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
// All imported modules in your tests should be mocked automatically
automock: false,
// Automatically clear mock calls and instances between every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: ['<rootDir>/lib/*.js'],
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
'/node_modules/',
'<rootDir>/lib/constants.js',
'<rootDir>/lib/typedefs.js'
],
// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
// An array of file extensions your modules use
moduleFileExtensions: ['js'],
// Automatically reset mock state between every test
resetMocks: false,
// Automatically restore mock state between every test
restoreMocks: false,
// A list of paths to directories that Jest should use to search for files in
roots: ['<rootDir>/tests/', '<rootDir>/lib/'],
// The test environment that will be used for testing
testEnvironment: 'node',
// The glob patterns Jest uses to detect test files
testMatch: ['**/?(*.)+(spec|test).[tj]s?(x)'],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
unmockedModulePathPatterns: []
};