Skip to content

Commit 6576bb5

Browse files
committed
fix(@angular/build): remove explicit test isolation configuration
This commit removes the explicit `isolate` option from the Vitest configuration within the Angular CLI builder. Previously, the `isolate` option was explicitly set to `false` for DOM emulation and browser mode. However, due to observed non-deterministic failures and the need for consistent isolation behavior across all environments, it's more robust to allow Vitest to manage test isolation by its own default mechanisms. This change ensures that Vitest's internal defaults for isolation are respected, which are generally designed for optimal reliability. (cherry picked from commit 138649e)
1 parent ee5e127 commit 6576bb5

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ export async function createVitestConfigPlugin(
117117
test: {
118118
setupFiles,
119119
globals: true,
120-
// Default to `false` to align with the Karma/Jasmine experience.
121-
isolate: false,
120+
// Allow Vitest to manage test isolation by its default behavior.
122121
sequence: { setupFiles: 'list' },
123122
},
124123
optimizeDeps: {

0 commit comments

Comments
 (0)