Skip to content
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

fix(@angular/build): warn and remove jsdom launcher when used with karma #29953

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Mar 26, 2025

The jsdom package does not currently support execution of ESM scripts. Attempting to use the karma jsdom launcher will cause test failures with potentially unclear error messages after the tests have been built and have started to execute. The karma application builder test runner will now issue a warning describing the problem and remove the jsdom launcher from the browsers option. The warning will be shown while analyzing the options and prior to the actual start of the test process.

@clydin clydin added the target: major This PR is targeted for the next major release label Mar 26, 2025
The jsdom package does not currently support execution of ESM scripts. Attempting
to use the karma jsdom launcher will cause test failures with potentially
unclear error messages after the tests have been built and have started to execute.
The karma application builder test runner will now issue a warning
describing the problem and remove the jsdom launcher from the `browsers` option.
The warning will be shown while analyzing the options and prior to the actual
start of the test process.
@clydin clydin force-pushed the karma/jsdom-warning branch from 7dd8efb to ab96179 Compare March 26, 2025 18:05
@clydin clydin marked this pull request as ready for review March 26, 2025 18:59
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Mar 27, 2025
@alan-agius4 alan-agius4 merged commit 52fbffc into angular:main Mar 27, 2025
30 checks passed
@clydin clydin deleted the karma/jsdom-warning branch March 27, 2025 10:55
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 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