Skip to content

test(@angular/build): add E2E test for Vitest custom browser configuration#33138

Merged
clydin merged 1 commit into
angular:mainfrom
clydin:vitest-custom-config-test
May 8, 2026
Merged

test(@angular/build): add E2E test for Vitest custom browser configuration#33138
clydin merged 1 commit into
angular:mainfrom
clydin:vitest-custom-config-test

Conversation

@clydin

@clydin clydin commented May 6, 2026

Copy link
Copy Markdown
Member

Add an E2E test to verify that the Vitest runner respects the browser configuration defined in vitest-base.config.ts when no CLI overrides are present. This ensures that custom configurations, such as specific browser providers or endpoints, are preserved when users rely solely on the configuration file.

@clydin
clydin force-pushed the vitest-custom-config-test branch 3 times, most recently from 534e4c7 to dbc8aa0 Compare May 6, 2026 16:32
…ation

Add an E2E test to verify that the Vitest runner respects the browser configuration defined in `vitest-base.config.ts` when no CLI overrides are present. This ensures that custom configurations, such as specific browser providers or endpoints, are preserved when users rely solely on the configuration file.
@clydin
clydin force-pushed the vitest-custom-config-test branch from dbc8aa0 to 1c22008 Compare May 6, 2026 16:54
@clydin
clydin marked this pull request as ready for review May 6, 2026 17:13

@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 introduces a new end-to-end test for Vitest browser support, which involves setting up a custom configuration file and verifying the browser environment via a spec file. The review feedback points out that the --runner-config flag is used incorrectly without a value and suggests removing it to properly test automatic configuration detection or providing the specific filename if testing the flag itself.

I am having trouble creating individual review comments. Click here to see my feedback.

tests/e2e/tests/vitest/browser-custom-config.ts (51)

high

The --runner-config flag is passed without a value. In the Angular CLI, options that expect a string (like a file path) will cause an error if the value is missing. Furthermore, the PR description states that this test verifies behavior "when no CLI overrides are present", but providing this flag on the command line constitutes an override. If the goal is to verify that the builder automatically detects and uses vitest-base.config.ts, the flag should be removed. If the goal was to test the option itself, the filename should be provided as a value (e.g. --runner-config=vitest-base.config.ts).

  const { stdout } = await ng('test', '--no-watch');
References
  1. Avoid placing a comma immediately after abbreviations like 'e.g.' in user-facing messages.

@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels May 6, 2026
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 8, 2026
@clydin
clydin merged commit 943fe40 into angular:main May 8, 2026
38 checks passed
@clydin

clydin commented May 8, 2026

Copy link
Copy Markdown
Member Author

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

@clydin
clydin deleted the vitest-custom-config-test branch May 8, 2026 12:51
@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants