fix(@angular/build): allow disabling Vitest isolation from builder#33294
Open
cexbrayat wants to merge 1 commit into
Open
fix(@angular/build): allow disabling Vitest isolation from builder#33294cexbrayat wants to merge 1 commit into
cexbrayat wants to merge 1 commit into
Conversation
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.
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Previously,
ng test --isolateworked because true was forwarded as an override, butng test --no-isolatewas normalized to false and then treated the same as an omitted option. As a result,test.isolate: trueinvitest-base.config.tsstayed 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-isolatecan override runnerConfig while the default still aligns with the Karma/Jasmine experience.Does this PR introduce a breaking change?
Other information