Skip to content

fix(test): TestRunner avoids using jest mock's require#19685

Merged
alexander-akait merged 1 commit intomainfrom
fix/test_runner_require
Jul 14, 2025
Merged

fix(test): TestRunner avoids using jest mock's require#19685
alexander-akait merged 1 commit intomainfrom
fix/test_runner_require

Conversation

@xiaoxiaojx
Copy link
Member

What kind of change does this PR introduce?
refactoring: the behavior of jest mock's require is different from that of node require

Did you add tests for your changes?
Yes

Does this PR introduce a breaking change?
No

What needs to be documented once your changes are merged?
No

@xiaoxiaojx xiaoxiaojx force-pushed the fix/test_runner_require branch from 6d98870 to 9291631 Compare July 11, 2025 15:37
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 11, 2025

CodSpeed Performance Report

Merging #19685 will degrade performances by 95.29%

Comparing fix/test_runner_require (1cd5216) with main (ad1e3b4)

Summary

⚡ 2 improvements
❌ 5 regressions
✅ 126 untouched 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}' 10.7 ms 226.9 ms -95.29%
benchmark "devtool-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.8 ms 44.2 ms -73.21%
benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.7 ms 44.2 ms -73.61%
benchmark "many-chunks-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 12 ms 61.3 ms -80.42%
benchmark "many-modules-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.2 ms 9.8 ms +14.09%
benchmark "minimal", scenario '{"name":"mode-development","mode":"development"}' 24.3 ms 30.7 ms -20.83%
benchmark "three-long", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 227 ms 13.1 ms ×17

@xiaoxiaojx xiaoxiaojx force-pushed the fix/test_runner_require branch from 9291631 to bb6e0a2 Compare July 11, 2025 16:02
@xiaoxiaojx xiaoxiaojx force-pushed the fix/test_runner_require branch from bb6e0a2 to 1cd5216 Compare July 11, 2025 16:17
@alexander-akait alexander-akait merged commit 6de2dfd into main Jul 14, 2025
43 of 44 checks passed
@alexander-akait alexander-akait deleted the fix/test_runner_require branch July 14, 2025 10:53
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