Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Nov 11, 2025

Summary

Since all rspack unit tests have been migrated to rstest, we can remove the jest scripts and dependencies.

performance compare (30% faster 🚀 )

img_v3_02ru_cc6a1623-6b82-4051-8665-19e92858efeg

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 11, 2025 09:02
@9aoy 9aoy requested a review from LingyuCoder as a code owner November 11, 2025 09:02
@netlify
Copy link

netlify bot commented Nov 11, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit ff0cb43
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6912fb9e8313190008b24011
😎 Deploy Preview https://deploy-preview-12150--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 11, 2025
Copy link
Contributor

Copilot AI left a 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.

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing ff0cb43 to fix: should not panic if ref-cjs is removed (#12147) by Fy

❌ Size increased by 384bytes from 48.09MB to 48.09MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 11, 2025

CodSpeed Performance Report

Merging #12150 will not alter performance

Comparing remove-jest (ff0cb43) with main (611e68c)

Summary

✅ 17 untouched

@9aoy 9aoy merged commit b53c97d into main Nov 11, 2025
81 of 83 checks passed
@9aoy 9aoy deleted the remove-jest branch November 11, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants