Skip to content

fix(@angular/build): name the provider packages in the unit-test browsers error - #34442

Merged
clydin merged 2 commits into
angular:mainfrom
MeAkib:fix/unit-test-browsers-provider-message
Oct 21, 2026
Merged

clydin merged 2 commits into
angular:mainfrom
MeAkib:fix/unit-test-browsers-provider-message

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

When runnerConfig is set, the up-front package check is skipped, so a missing browser provider was reported by a later check that asked users to install "playwright" or "webdriverio". The builder actually requires @vitest/browser-playwright, @vitest/browser-webdriverio or @vitest/browser-preview. Use the same wording as the regular check.

…wsers` error

When `runnerConfig` is set, the up-front package check is skipped, so a missing browser provider was
reported by a later check that asked users to install "playwright" or "webdriverio". The builder
actually requires `@vitest/browser-playwright`, `@vitest/browser-webdriverio` or
`@vitest/browser-preview`. Use the same wording as the regular check.

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

Copy link
Copy Markdown

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 error message displayed when no browser provider is installed for Vitest, explicitly listing the required packages: '@vitest/browser-playwright', '@vitest/browser-webdriverio', and '@vitest/browser-preview'. Additionally, a unit test has been added to verify that this updated error message is correctly triggered when a runner configuration skips the dependency check. There are no review comments, and the changes look solid, so I have no feedback to provide.

);
});

it('should name the provider packages when a runner config skips the dependency check', async () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Isn't this a duplicate of the above test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It exercises a different path. With runnerConfig set, the up-front package check in index.ts is skipped, and the error comes from browser-provider.ts, which had the stale "playwright"/"webdriverio" wording. The two messages differ ("to be installed." versus "to be installed within the project."), but my assertion matched only the common prefix, so they looked the same. I've tightened the assertion to the text unique to the second path. I can also drop the test if you'd rather not cover it.

@MeAkib
MeAkib requested a review from alan-agius4 October 20, 2026 12:35
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Oct 21, 2026
@clydin
clydin merged commit f9325ab into angular:main Oct 21, 2026
41 checks passed
@clydin

clydin commented Oct 21, 2026

Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

@MeAkib
MeAkib deleted the fix/unit-test-browsers-provider-message branch October 21, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants