Skip to content

feat(@angular/build): add experimental vitest browser support to unit-testing #30168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 24, 2025

The experimental unit-test builder now allows for enabling the experimental vitest browser testing support. A browsers option is now available that can list one or more browsers to use for test execution. If the browsers option is not specified (the default), then jsdom will be used to execute the tests without a browser. To use the browser support, either playwright or webdriverio must be installed within the project. On startup, the testing process will automatically attempt to discover the browser provider. The browser names present in the browsers option must be specified based on the installed provider. Each may have differing names for some browsers.

…-testing

The experimental `unit-test` builder now allows for enabling the experimental
vitest browser testing support. A `browsers` option is now available that
can list one or more browsers to use for test execution. If the `browsers`
option is not specified (the default), then `jsdom` will be used to execute
the tests without a browser. To use the browser support, either `playwright`
or `webdriverio` must be installed within the project. On startup, the testing
process will automatically attempt to discover the browser provider. The
browser names present in the `browsers` option must be specified based on the
installed provider. Each may have differing names for some browsers.
@clydin clydin added the target: major This PR is targeted for the next major release label Apr 24, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/build labels Apr 24, 2025
@clydin clydin marked this pull request as ready for review April 24, 2025 15:33
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 24, 2025
@clydin clydin requested a review from alan-agius4 April 24, 2025 15:33
@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 Apr 24, 2025
@alan-agius4 alan-agius4 merged commit d6ea6b0 into angular:main Apr 24, 2025
35 of 36 checks passed
@clydin clydin deleted the unit-test/vitest-browsers branch April 24, 2025 19:16
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 detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants