Skip to content

Commit 05cc9da

Browse files
committed
fix(@angular/build): ensure Vitest setup files are executed in order
This commit configures the Vitest runner to execute setup files in the order they are defined. This is crucial for ensuring that polyfills and the Angular TestBed are initialized in the correct sequence before any tests are run, preventing potential issues with the testing environment.
1 parent 72f2a46 commit 05cc9da

File tree

1 file changed

+1
-0
lines changed
  • packages/angular/build/src/builders/unit-test/runners/vitest

1 file changed

+1
-0
lines changed

packages/angular/build/src/builders/unit-test/runners/vitest/plugins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export async function createVitestConfigPlugin(
119119
globals: true,
120120
// Default to `false` to align with the Karma/Jasmine experience.
121121
isolate: false,
122+
sequence: { setupFiles: 'list' },
122123
},
123124
optimizeDeps: {
124125
noDiscovery: true,

0 commit comments

Comments
 (0)