Skip to content

test: hotCaseTest and watchCaseTest no longer auto setup jsdom env#19676

Merged
alexander-akait merged 1 commit intomainfrom
correct-test-jsdom
Jul 9, 2025
Merged

test: hotCaseTest and watchCaseTest no longer auto setup jsdom env#19676
alexander-akait merged 1 commit intomainfrom
correct-test-jsdom

Conversation

@hai-x
Copy link
Member

@hai-x hai-x commented Jul 9, 2025

What kind of change does this PR introduce?

We should not setup jsdom (i.e. fetch...) when target: node.

Did you add tests for your changes?

Existing

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

No

@alexander-akait
Copy link
Member

alexander-akait commented Jul 9, 2025

Technically fetch exists in Node.js - https://nodejs.org/en/learn/getting-started/fetch, but should throw an error when file: or raw path used, i.e. only if you have http/https

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 9, 2025

CodSpeed Performance Report

Merging #19676 will degrade performances by 94.28%

Comparing correct-test-jsdom (ff4dd52) with main (09a7a97)

Summary

⚡ 1 improvements
❌ 3 regressions
✅ 117 untouched benchmarks
🆕 12 new benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "cache-filesystem", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 13 ms 227.5 ms -94.28%
benchmark "devtool-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 35.9 ms 63.8 ms -43.69%
benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 49.6 ms 61.8 ms -19.88%
🆕 benchmark "lodash", scenario '{"name":"mode-development","mode":"development"}' N/A 784.9 ms N/A
🆕 benchmark "lodash", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' N/A 38.1 ms N/A
🆕 benchmark "lodash", scenario '{"name":"mode-production","mode":"production"}' N/A 9.7 s N/A
🆕 benchmark "many-chunks-commonjs", scenario '{"name":"mode-development","mode":"development"}' N/A 247.3 ms N/A
🆕 benchmark "many-chunks-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' N/A 11.7 ms N/A
🆕 benchmark "many-chunks-commonjs", scenario '{"name":"mode-production","mode":"production"}' N/A 2 s N/A
🆕 benchmark "many-chunks-esm", scenario '{"name":"mode-development","mode":"development"}' N/A 250.2 ms N/A
🆕 benchmark "many-chunks-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' N/A 61.7 ms N/A
🆕 benchmark "many-chunks-esm", scenario '{"name":"mode-production","mode":"production"}' N/A 2.3 s N/A
🆕 benchmark "many-modules-commonjs", scenario '{"name":"mode-development","mode":"development"}' N/A 308.9 ms N/A
🆕 benchmark "many-modules-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' N/A 52.6 ms N/A
🆕 benchmark "many-modules-commonjs", scenario '{"name":"mode-production","mode":"production"}' N/A 2.1 s N/A
benchmark "many-modules-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 50.5 ms 9.8 ms ×5.1

@alexander-akait alexander-akait merged commit 24b1ec7 into main Jul 9, 2025
43 of 44 checks passed
@alexander-akait alexander-akait deleted the correct-test-jsdom branch July 9, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants