From 32a01485c185efc594709b0f61cf481d381051f6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:01:30 -0500 Subject: [PATCH] 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. --- .../build/src/builders/unit-test/runners/vitest/plugins.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular/build/src/builders/unit-test/runners/vitest/plugins.ts b/packages/angular/build/src/builders/unit-test/runners/vitest/plugins.ts index 04554955cd18..5255ef519fec 100644 --- a/packages/angular/build/src/builders/unit-test/runners/vitest/plugins.ts +++ b/packages/angular/build/src/builders/unit-test/runners/vitest/plugins.ts @@ -117,8 +117,7 @@ export async function createVitestConfigPlugin( test: { setupFiles, globals: true, - // Default to `false` to align with the Karma/Jasmine experience. - isolate: false, + // Allow Vitest to manage test isolation by its default behavior. sequence: { setupFiles: 'list' }, }, optimizeDeps: {