-
-
Notifications
You must be signed in to change notification settings - Fork 746
test: remove jest script #12150
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
test: remove jest script #12150
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 completes the migration from Jest to rstest by removing all Jest-related scripts, dependencies, and configuration files. The migration enables better performance for Rspack unit tests.
- Updates documentation to reference rstest instead of Jest for test commands and CLI arguments
- Removes Jest configuration files and custom reporters
- Updates type definitions to use rstest types instead of Jest types
Reviewed Changes
Copilot reviewed 22 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Removes Jest dependencies (jest, jest-cli, ts-jest, @types/jest) and updates @rstest/core to version 0.6.4 |
pnpm-lock.yaml |
Updates lockfile to reflect removal of Jest dependencies and upgrade of @rstest/core |
tests/rspack-test/package.json |
Updates @rstest/core dependency version to 0.6.4 |
tests/rspack-test/jest.config.js |
Removes Jest configuration file (no longer needed) |
tests/rspack-test/jest.d.ts |
Removes Jest type definitions file |
tests/rspack-test/jsconfig.json |
Adds new jsconfig referencing rstest type definitions |
tests/rspack-test/rstest.d.ts |
Adds new rstest type definitions reference |
packages/rspack-test-tools/package.json |
Removes Jest dependencies (@jest/reporters, jest-environment-node) and updates exports to remove jest-specific paths |
packages/rspack-test-tools/jest.d.ts |
Removes Jest type definitions file |
packages/rspack-test-tools/rstest.d.ts |
Adds new rstest type definitions with custom matchers and global types |
packages/rspack-test-tools/tsconfig.json |
Updates to reference rstest type definitions |
packages/rspack-test-tools/src/type.ts |
Updates type references from jest.Expect to Expect and improves array type syntax |
packages/rspack-test-tools/src/test/creator.ts |
Removes jest references and uses only rstest |
packages/rspack-test-tools/src/runner/node/index.ts |
Updates error message to reference rstest CLI instead of jest-cli |
packages/rspack-test-tools/src/jest/*.js |
Removes Jest-specific utilities (slash, patch-node-env, reporters) |
packages/rspack-test-tools/src/helper/legacy/createLazyTestEnv.js |
Removes jest references and uses only rstest |
packages/rspack-test-tools/src/helper/directory.ts |
Updates type from jest.Describe to Describe |
packages/rspack-test-tools/src/case/defaults.ts |
Updates type from jest.JestMatchers to Assertion |
packages/rspack-test-tools/src/case/common.ts |
Updates error message to reference rstest instead of jest |
packages/rspack-test-tools/src/case/cache.ts |
Minor code style improvement (removes unnecessary type assertion) |
packages/rspack-test-tools/etc/test-tools.api.md |
Updates API documentation to reflect type changes |
packages/rspack-test-tools/README.md |
Updates documentation to reference rstest.config.ts instead of jest.config.js |
website/docs/en/contribute/development/testing.mdx |
Updates documentation to reference rstest CLI and configuration |
website/docs/zh/contribute/development/testing.mdx |
Updates Chinese documentation to reference rstest CLI and configuration |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
❌ Size increased by 384bytes from 48.09MB to 48.09MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12150 will not alter performanceComparing Summary
|
Summary
Since all rspack unit tests have been migrated to
rstest, we can remove thejestscripts and dependencies.performance compare (30% faster 🚀 )
Related links
Checklist