UNPKG

6.56 kBPlain TextView Raw
1/*
2 * For a detailed explanation regarding each configuration property and type check, visit:
3 * https://jestjs.io/docs/configuration
4 */
5
6export default {
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: "/tmp/jest_rs",
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: "babel",
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: undefined,
46
47 // A path to a custom dependency extractor
48 // dependencyExtractor: undefined,
49
50 // Make calling deprecated APIs throw helpful error messages
51 // errorOnDeprecated: false,
52
53 // The default configuration for fake timers
54 // fakeTimers: {
55 // "enableGlobally": false
56 // },
57
58 // Force coverage collection from ignored files using an array of glob patterns
59 // forceCoverageMatch: [],
60
61 // A path to a module which exports an async function that is triggered once before all test suites
62 // globalSetup: undefined,
63
64 // A path to a module which exports an async function that is triggered once after all test suites
65 // globalTeardown: undefined,
66
67 // A set of global variables that need to be available in all test environments
68 // globals: {},
69
70 // 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.
71 // maxWorkers: "50%",
72
73 // An array of directory names to be searched recursively up from the requiring module's location
74 // moduleDirectories: [
75 // "node_modules"
76 // ],
77
78 // An array of file extensions your modules use
79 // moduleFileExtensions: [
80 // "js",
81 // "mjs",
82 // "cjs",
83 // "jsx",
84 // "ts",
85 // "tsx",
86 // "json",
87 // "node"
88 // ],
89
90 // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
91 // moduleNameMapper: {},
92
93 // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
94 // modulePathIgnorePatterns: [],
95
96 // Activates notifications for test results
97 // notify: false,
98
99 // An enum that specifies notification mode. Requires { notify: true }
100 // notifyMode: "failure-change",
101
102 // A preset that is used as a base for Jest's configuration
103 // preset: [
104 // ['@babel/preset-env', {targets: {node: 'current'}}],
105 // '@babel/preset-typescript',
106 // ],
107
108 // Run tests from one or more projects
109 // projects: undefined,
110
111 // Use this configuration option to add custom reporters to Jest
112 // reporters: undefined,
113
114 // Automatically reset mock state before every test
115 // resetMocks: false,
116
117 // Reset the module registry before running each individual test
118 // resetModules: false,
119
120 // A path to a custom resolver
121 // resolver: undefined,
122
123 // Automatically restore mock state and implementation before every test
124 // restoreMocks: false,
125
126 // The root directory that Jest should scan for tests and modules within
127 // rootDir: undefined,
128
129 // A list of paths to directories that Jest should use to search for files in
130 // roots: [
131 // "<rootDir>"
132 // ],
133
134 // Allows you to use a custom runner instead of Jest's default test runner
135 // runner: "jest-runner",
136
137 // The paths to modules that run some code to configure or set up the testing environment before each test
138 // setupFiles: [],
139
140 // A list of paths to modules that run some code to configure or set up the testing framework before each test
141 // setupFilesAfterEnv: [],
142
143 // The number of seconds after which a test is considered as slow and reported as such in the results.
144 // slowTestThreshold: 5,
145
146 // A list of paths to snapshot serializer modules Jest should use for snapshot testing
147 // snapshotSerializers: [],
148
149 // The test environment that will be used for testing
150 // testEnvironment: "jest-environment-node",
151
152 // Options that will be passed to the testEnvironment
153 // testEnvironmentOptions: {},
154
155 // Adds a location field to test results
156 // testLocationInResults: false,
157
158 // The glob patterns Jest uses to detect test files
159 // testMatch: [
160 // "**/__tests__/**/*.[jt]s?(x)",
161 // "**/?(*.)+(spec|test).[tj]s?(x)"
162 // ],
163
164 // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
165 // testPathIgnorePatterns: [
166 // "/node_modules/"
167 // ],
168
169 // The regexp pattern or array of patterns that Jest uses to detect test files
170 // testRegex: [],
171
172 // This option allows the use of a custom results processor
173 // testResultsProcessor: undefined,
174
175 // This option allows use of a custom test runner
176 // testRunner: "jest-circus/runner",
177
178 // A map from regular expressions to paths to transformers
179 // transform: undefined,
180
181 // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
182 // transformIgnorePatterns: [
183 // "/node_modules/",
184 // "\\.pnp\\.[^\\/]+$"
185 // ],
186
187 // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
188 // unmockedModulePathPatterns: undefined,
189
190 // Indicates whether each individual test should be reported during the run
191 // verbose: undefined,
192
193 // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
194 // watchPathIgnorePatterns: [],
195
196 // Whether to use watchman for file crawling
197 // watchman: true,
198};