Skip to content

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

Open
MeAkib wants to merge 2 commits into
angular:mainfrom
MeAkib:fix/unit-test-browsers-provider-message
Open

MeAkib wants to merge 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.

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.

2 participants