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