forked from OWASP/OpenCRE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
executable file
·72 lines (54 loc) · 2.34 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Automatically clear mock calls, instances and results before 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: ['*.ts'],
// 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/'],
// Indicates which provider should be used to instrument code for coverage
coverageProvider: 'babel',
// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: [
'json',
// "text",
// "lcov",
// "clover"
],
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
maxWorkers: '50%',
// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: ['node_modules', 'src'],
// An array of file extensions your modules use
moduleFileExtensions: [
'js',
'jsx',
'ts',
'tsx',
// "json",
// "node"
],
// Activates notifications for test results
notify: false,
// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",
// Automatically reset mock state before every test
resetMocks: false,
// The root directory that Jest should scan for tests and modules within
rootDir: 'application/frontend/src/',
// A list of paths to directories that Jest should use to search for files in
roots: [],
// The number of seconds after which a test is considered as slow and reported as such in the results.
slowTestThreshold: 5,
// The test environment that will be used for testing
testEnvironment: 'jsdom',
// The glob patterns Jest uses to detect test files
testMatch: ['**/test/*.ts', 'basic-e2etests.ts'],
// Indicates whether each individual test should be reported during the run
verbose: true,
};