diff options
Diffstat (limited to 'jest.config.js')
-rw-r--r-- | jest.config.js | 166 |
1 files changed, 4 insertions, 162 deletions
diff --git a/jest.config.js b/jest.config.js index 964e4d4e6..ba4ed9cd2 100644 --- a/jest.config.js +++ b/jest.config.js | |||
@@ -4,15 +4,6 @@ | |||
4 | * https://jestjs.io/docs/configuration | 4 | * https://jestjs.io/docs/configuration |
5 | */ | 5 | */ |
6 | module.exports = { | 6 | module.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/cr/bs8xmfp1525cbl_y2h972wf40000gn/T/jest_dx", | ||
15 | |||
16 | // Automatically clear mock calls, instances and results before every test | 7 | // Automatically clear mock calls, instances and results before every test |
17 | clearMocks: true, | 8 | clearMocks: true, |
18 | 9 | ||
@@ -25,131 +16,13 @@ module.exports = { | |||
25 | // The directory where Jest should output its coverage files | 16 | // The directory where Jest should output its coverage files |
26 | coverageDirectory: 'coverage', | 17 | coverageDirectory: 'coverage', |
27 | 18 | ||
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 | // 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%", | ||
67 | |||
68 | // An array of directory names to be searched recursively up from the requiring module's location | ||
69 | // moduleDirectories: [ | ||
70 | // "node_modules" | ||
71 | // ], | ||
72 | |||
73 | // An array of file extensions your modules use | ||
74 | // moduleFileExtensions: [ | ||
75 | // "js", | ||
76 | // "jsx", | ||
77 | // "ts", | ||
78 | // "tsx", | ||
79 | // "json", | ||
80 | // "node" | ||
81 | // ], | ||
82 | |||
83 | // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module | ||
84 | // moduleNameMapper: {}, | ||
85 | |||
86 | // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader | ||
87 | // modulePathIgnorePatterns: [], | ||
88 | |||
89 | // Activates notifications for test results | ||
90 | // notify: false, | ||
91 | |||
92 | // An enum that specifies notification mode. Requires { notify: true } | ||
93 | // notifyMode: "failure-change", | ||
94 | |||
95 | // A preset that is used as a base for Jest's configuration | ||
96 | // preset: undefined, | ||
97 | |||
98 | // Run tests from one or more projects | ||
99 | // projects: undefined, | ||
100 | |||
101 | // Use this configuration option to add custom reporters to Jest | ||
102 | // reporters: undefined, | ||
103 | |||
104 | // Automatically reset mock state before every test | ||
105 | // resetMocks: false, | ||
106 | |||
107 | // Reset the module registry before running each individual test | ||
108 | // resetModules: false, | ||
109 | |||
110 | // A path to a custom resolver | ||
111 | // resolver: undefined, | ||
112 | |||
113 | // Automatically restore mock state and implementation before every test | ||
114 | // restoreMocks: false, | ||
115 | |||
116 | // The root directory that Jest should scan for tests and modules within | ||
117 | // rootDir: undefined, | ||
118 | |||
119 | // A list of paths to directories that Jest should use to search for files in | 19 | // A list of paths to directories that Jest should use to search for files in |
120 | roots: ['src/', 'test/'], | 20 | roots: ['src/', 'test/'], |
121 | 21 | ||
122 | // Allows you to use a custom runner instead of Jest's default test runner | ||
123 | // runner: "jest-runner", | ||
124 | |||
125 | // The paths to modules that run some code to configure or set up the testing environment before each test | ||
126 | // setupFiles: [], | ||
127 | |||
128 | // A list of paths to modules that run some code to configure or set up the testing framework before each test | ||
129 | // setupFilesAfterEnv: [], | ||
130 | |||
131 | // The number of seconds after which a test is considered as slow and reported as such in the results. | ||
132 | // slowTestThreshold: 5, | ||
133 | |||
134 | // A list of paths to snapshot serializer modules Jest should use for snapshot testing | ||
135 | // snapshotSerializers: [], | ||
136 | |||
137 | // The test environment that will be used for testing | 22 | // The test environment that will be used for testing |
138 | // testEnvironment: "jest-environment-node", | 23 | // testEnvironment: "jest-environment-node", |
139 | testEnvironment: 'node', | 24 | testEnvironment: 'node', |
140 | 25 | ||
141 | // Options that will be passed to the testEnvironment | ||
142 | // testEnvironmentOptions: {}, | ||
143 | |||
144 | // Adds a location field to test results | ||
145 | // testLocationInResults: false, | ||
146 | |||
147 | // The glob patterns Jest uses to detect test files | ||
148 | // testMatch: [ | ||
149 | // "**/__tests__/**/*.[jt]s?(x)", | ||
150 | // "**/?(*.)+(spec|test).[tj]s?(x)" | ||
151 | // ], | ||
152 | |||
153 | // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped | 26 | // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped |
154 | testPathIgnorePatterns: [ | 27 | testPathIgnorePatterns: [ |
155 | '/node_modules/', | 28 | '/node_modules/', |
@@ -158,39 +31,8 @@ module.exports = { | |||
158 | '/src/internal-server', | 31 | '/src/internal-server', |
159 | ], | 32 | ], |
160 | 33 | ||
161 | // The regexp pattern or array of patterns that Jest uses to detect test files | 34 | "transform": { |
162 | // testRegex: [], | 35 | "^.+\\.tsx?$": "esbuild-runner/jest", |
163 | 36 | "^.+\\.ts?$": "esbuild-runner/jest" | |
164 | // This option allows the use of a custom results processor | 37 | } |
165 | // testResultsProcessor: undefined, | ||
166 | |||
167 | // This option allows use of a custom test runner | ||
168 | // testRunner: "jest-circus/runner", | ||
169 | |||
170 | // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href | ||
171 | // testURL: "http://localhost", | ||
172 | |||
173 | // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" | ||
174 | // timers: "real", | ||
175 | |||
176 | // A map from regular expressions to paths to transformers | ||
177 | // transform: undefined, | ||
178 | |||
179 | // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation | ||
180 | // transformIgnorePatterns: [ | ||
181 | // "/node_modules/", | ||
182 | // "\\.pnp\\.[^\\/]+$" | ||
183 | // ], | ||
184 | |||
185 | // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them | ||
186 | // unmockedModulePathPatterns: undefined, | ||
187 | |||
188 | // Indicates whether each individual test should be reported during the run | ||
189 | // verbose: undefined, | ||
190 | |||
191 | // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode | ||
192 | // watchPathIgnorePatterns: [], | ||
193 | |||
194 | // Whether to use watchman for file crawling | ||
195 | // watchman: true, | ||
196 | }; | 38 | }; |