Skip to content

fix(@angular/build): allow disabling Vitest isolation from builder#33294

Open
cexbrayat wants to merge 1 commit into
angular:mainfrom
cexbrayat:fix/vitest-isolate-override
Open

fix(@angular/build): allow disabling Vitest isolation from builder#33294
cexbrayat wants to merge 1 commit into
angular:mainfrom
cexbrayat:fix/vitest-isolate-override

Conversation

@cexbrayat
Copy link
Copy Markdown
Member

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Previously, ng test --isolate worked because true was forwarded as an override, but ng test --no-isolate was normalized to false and then treated the same as an omitted option. As a result, test.isolate: true in vitest-base.config.ts stayed active.

What is the new behavior?

Keep the isolate builder option undefined when it is omitted so a Vitest runner config can provide its own value.

Forward explicit false values to the Vitest project config so --no-isolate can override runnerConfig while the default still aligns with the Karma/Jasmine experience.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Keep the isolate builder option undefined when it is omitted so a Vitest runner config can provide its own value.

Previously, ng test --isolate worked because true was forwarded as an override, but ng test --no-isolate was normalized to false and then treated the same as an omitted option. As a result, test.isolate: true in vitest-base.config.ts stayed active.

Forward explicit false values to the Vitest project config so --no-isolate can override runnerConfig while the default still aligns with the Karma/Jasmine experience.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the unit test builder to allow the isolate option to be explicitly set to false instead of defaulting to false when undefined. This ensures that a CLI option of isolate: false can override a true setting in the Vitest configuration file. A unit test has been added to verify this behavior. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant