Commit 5469999
committed
refactor(@angular/build): avoid secondary import wrapper in Vitest unless coverage is enabled
This commit optimizes the Vitest test runner by removing the secondary import wrapper
for test entry points when code coverage is not enabled. The wrapper is only necessary
to support coverage exclusion of the test files themselves.
By capturing the resolved Vitest configuration within the `configureVitest` hook,
the plugin can now determine if coverage is enabled and conditionally apply the
wrapper. This simplifies the module graph for standard test runs.1 parent f712361 commit 5469999
File tree
1 file changed
+14
-6
lines changed- packages/angular/build/src/builders/unit-test/runners/vitest
1 file changed
+14
-6
lines changedLines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| |||
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
251 | | - | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| |||
257 | 262 | | |
258 | 263 | | |
259 | 264 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
| |||
0 commit comments