UNPKG

6.59 kBJavaScriptView Raw
1/*
2 * For a detailed explanation regarding each configuration property, visit:
3 * https://jestjs.io/docs/configuration
4 */
5
6module.exports = {
7 // All imported modules in your tests should be mocked automatically
8 // automock: false,
9
10 // Stop running tests after `n` failures
11 // bail: 0,
12
13 // The directory where Jest should store its cached dependency information
14 // cacheDirectory: "/private/var/folders/7c/_qpb24xj6yx0m80tj9tfdzqw0000gn/T/jest_dx",
15
16 // Automatically clear mock calls, instances, contexts and results before every test
17 clearMocks: true,
18
19 // Indicates whether the coverage information should be collected while executing the test
20 collectCoverage: true,
21
22 // An array of glob patterns indicating a set of files for which coverage information should be collected
23 // collectCoverageFrom: undefined,
24
25 // The directory where Jest should output its coverage files
26 coverageDirectory: 'coverage',
27
28 // An array of regexp pattern strings used to skip coverage collection
29 // coveragePathIgnorePatterns: [
30 // "/node_modules/"
31 // ],
32
33 // Indicates which provider should be used to instrument code for coverage
34 coverageProvider: 'v8',
35
36 // A list of reporter names that Jest uses when writing coverage reports
37 // coverageReporters: [
38 // "json",
39 // "text",
40 // "lcov",
41 // "clover"
42 // ],
43
44 // An object that configures minimum threshold enforcement for coverage results
45 coverageThreshold: {
46 global: {
47 branches: 96,
48 functions: 100,
49 lines: 96,
50 statements: 96,
51 },
52 },
53
54 // A path to a custom dependency extractor
55 // dependencyExtractor: undefined,
56
57 // Make calling deprecated APIs throw helpful error messages
58 // errorOnDeprecated: false,
59
60 // The default configuration for fake timers
61 // fakeTimers: {
62 // "enableGlobally": false
63 // },
64
65 // Force coverage collection from ignored files using an array of glob patterns
66 // forceCoverageMatch: [],
67
68 // A path to a module which exports an async function that is triggered once before all test suites
69 // globalSetup: undefined,
70
71 // A path to a module which exports an async function that is triggered once after all test suites
72 // globalTeardown: undefined,
73
74 // A set of global variables that need to be available in all test environments
75 // globals: {},
76
77 // 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.
78 // maxWorkers: "50%",
79
80 // An array of directory names to be searched recursively up from the requiring module's location
81 // moduleDirectories: [
82 // "node_modules"
83 // ],
84
85 // An array of file extensions your modules use
86 // moduleFileExtensions: [
87 // "js",
88 // "mjs",
89 // "cjs",
90 // "jsx",
91 // "ts",
92 // "tsx",
93 // "json",
94 // "node"
95 // ],
96
97 // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
98 // moduleNameMapper: {},
99
100 // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
101 // modulePathIgnorePatterns: [],
102
103 // Activates notifications for test results
104 // notify: false,
105
106 // An enum that specifies notification mode. Requires { notify: true }
107 // notifyMode: "failure-change",
108
109 // A preset that is used as a base for Jest's configuration
110 // preset: undefined,
111
112 // Run tests from one or more projects
113 // projects: undefined,
114
115 // Use this configuration option to add custom reporters to Jest
116 // reporters: undefined,
117
118 // Automatically reset mock state before every test
119 // resetMocks: false,
120
121 // Reset the module registry before running each individual test
122 // resetModules: false,
123
124 // A path to a custom resolver
125 // resolver: undefined,
126
127 // Automatically restore mock state and implementation before every test
128 // restoreMocks: false,
129
130 // The root directory that Jest should scan for tests and modules within
131 // rootDir: undefined,
132
133 // A list of paths to directories that Jest should use to search for files in
134 // roots: [
135 // "<rootDir>"
136 // ],
137
138 // Allows you to use a custom runner instead of Jest's default test runner
139 // runner: "jest-runner",
140
141 // The paths to modules that run some code to configure or set up the testing environment before each test
142 // setupFiles: [],
143
144 // A list of paths to modules that run some code to configure or set up the testing framework before each test
145 // setupFilesAfterEnv: [],
146
147 // The number of seconds after which a test is considered as slow and reported as such in the results.
148 // slowTestThreshold: 5,
149
150 // A list of paths to snapshot serializer modules Jest should use for snapshot testing
151 // snapshotSerializers: [],
152
153 // The test environment that will be used for testing
154 // testEnvironment: "jest-environment-node",
155
156 // Options that will be passed to the testEnvironment
157 // testEnvironmentOptions: {},
158
159 // Adds a location field to test results
160 // testLocationInResults: false,
161
162 // The glob patterns Jest uses to detect test files
163 testMatch: [
164 '**/__tests__/**/*.[jt]s?(x)',
165 // "**/?(*.)+(spec|test).[tj]s?(x)"
166 ],
167
168 // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
169 testPathIgnorePatterns: ['/node_modules/', '/.history/'],
170
171 // The regexp pattern or array of patterns that Jest uses to detect test files
172 // testRegex: [],
173
174 // This option allows the use of a custom results processor
175 // testResultsProcessor: undefined,
176
177 // This option allows use of a custom test runner
178 // testRunner: "jest-circus/runner",
179
180 // A map from regular expressions to paths to transformers
181 // transform: undefined,
182
183 // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
184 // transformIgnorePatterns: [
185 // "/node_modules/",
186 // "\\.pnp\\.[^\\/]+$"
187 // ],
188
189 // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
190 // unmockedModulePathPatterns: undefined,
191
192 // Indicates whether each individual test should be reported during the run
193 // verbose: undefined,
194
195 // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
196 // watchPathIgnorePatterns: [],
197
198 // Whether to use watchman for file crawling
199 // watchman: true,
200};