Debian Codegraph @

jest.config.js

raw
1 'use strict';
2
3 module.exports = {
4 // Automatically clear mock calls and instances between every test
5 clearMocks: true,
6
7 // Indicates whether the coverage information should be collected while executing the test
8 collectCoverage: true,
9
10 // An array of glob patterns indicating a set of files fo
11 // which coverage information should be collected
12 collectCoverageFrom: [
13 'tests/jest/*.js'
14 ],
15
16 // The directory where Jest should output its coverage files
17 coverageDirectory: 'coverage',
18
19 // An array of regexp pattern strings used to skip coverage collection
20 coveragePathIgnorePatterns: [
21 '/node_modules/'
22 ],
23
24 // An object that configures minimum threshold enforcement for coverage results
25 coverageThreshold: {
26 global: {
27 branches: 31,
28 functions: 39,
29 lines: 38,
30 statements: 38
31 }
32 },
33
34 // An array of file extensions your modules use
35 moduleFileExtensions: [
36 'js'
37 ],
38
39 // The paths to modules that run some code to configure or
40 // set up the testing environment before each test
41 setupFiles: [
42 './tests/jest/setup.js'
43 ],
44
45 // Simulates a real browser environment.
46 testEnvironment: 'jsdom',
47
48 // Ignore these directories when locating tests to run.
49 testPathIgnorePatterns: [
50 '<rootDir>/node_modules/',
51 '<rootDir>/resources/'
52 ]
53 };