Debian Codegraph @

tests/jest/jest.config.js

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