Skip to content

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

Open
clydin wants to merge 1 commit intoangular:mainfrom
clydin:vitest-custom-config-test
Open

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

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented May 6, 2026

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
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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer 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.

1 participant