-
-
Notifications
You must be signed in to change notification settings - Fork 746
test: use jsdom runner to run all cases #11924
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
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates browser-oriented tests to run under a jsdom-driven WebRunner and removes the legacy FakeDocument path. It unifies the web runner, updates test utilities and configs, and adjusts tests to work with jsdom behavior.
- Replace FakeDocument and separate jsdom runner with a unified jsdom-based WebRunner
- Update TTestConfig and runner options (documentType removed; location introduced)
- Modernize tests to use getLinkSheet and jsdom-compatible assertions; adjust/skip a few cases
Reviewed Changes
Copilot reviewed 96 out of 111 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/rspack-test-tools/src/runner/web/index.ts | Introduces unified jsdom WebRunner; resource loading, URL mapping, and helper utilities (getLinkSheet) |
| packages/rspack-test-tools/src/type.ts | Removes EDocumentType; TTestConfig now supports location |
| packages/rspack-test-tools/src/case/{runner,watch,hot,incremental}.ts | Switch runners/processors to jsdom WebRunner and location-based config |
| packages/rspack-test-tools/src/case/config.ts | findBundle returns CSS path relative to output for jsdom linking |
| tests/rspack-test/configCases/**/* | Update tests for jsdom semantics (computed styles, link sheet reading); add a filter for a problematic case |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tests/rspack-test/configCases/web/prefetch-preload-module-jsonp/test.filter.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/web/prefetch-preload-module-jsonp/test.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/web/prefetch-preload-module-jsonp/index.mjs
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/css/url-and-asset-module-filename/index.js
Show resolved
Hide resolved
📦 Binary Size-limit
🙈 Size remains the same at 47.73MB |
ccf71a5 to
5548999
Compare
CodSpeed Performance ReportMerging #11924 will not alter performanceComparing Summary
|
Summary
Related links
Checklist