test(@angular/build): add E2E test for Vitest custom browser configuration#33138
test(@angular/build): add E2E test for Vitest custom browser configuration#33138clydin wants to merge 1 commit intoangular:mainfrom
Conversation
534e4c7 to
dbc8aa0
Compare
…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.
dbc8aa0 to
1c22008
Compare
There was a problem hiding this comment.
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)
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
- Avoid placing a comma immediately after abbreviations like 'e.g.' in user-facing messages.
Add an E2E test to verify that the Vitest runner respects the browser configuration defined in
vitest-base.config.tswhen 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.