Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Oct 16, 2025

Summary

migrate config tests from jest to rstest.

jest:
img_v3_02r4_186bc4ba-47ad-44ca-be36-8bc34ff12b5g

rstest:
img_v3_02r4_b8aba93b-d91c-4273-bb3a-b42ec35fe70g

Related links

Checklist

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

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

netlify bot commented Oct 16, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 9f22fcb
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68f1c13a45917300081a6016

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 16, 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 migrates configuration tests from Jest to rstest, introducing rstest as an alternative testing framework while maintaining Jest for other tests. The migration involves updating test file references from jest to rstest, adding rstest configuration, and adjusting test helper code to support both frameworks.

Key Changes

  • Added rstest configuration file and package dependency to enable rstest-based testing
  • Updated all test files to use rstest API instead of jest API (spyOn, fn, etc.)
  • Modified test infrastructure to support both Jest and rstest through conditional globals

Reviewed Changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/rspack-test/rstest.config.ts New rstest configuration mirroring Jest setup
tests/rspack-test/package.json Added rstest dependency and test script
tests/rspack-test/jest.config.js Excluded Config.test.js from Jest execution
packages/rspack-test-tools/src/test/creator.ts Updated to support both Jest and rstest globals
packages/rspack-test-tools/src/helper/setup-env.ts Added rstest environment variable handling
Multiple test files Replaced jest references with rstest
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

📦 Binary Size-limit

Comparing 9f22fcb to feat(create-rspack): add type annotations to JS configs (#11896) by neverland

🙈 Size remains the same at 47.67MB

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 16, 2025

CodSpeed Performance Report

Merging #11895 will not alter performance

Comparing rstest (9f22fcb) with main (2ccce25)1

Summary

✅ 17 untouched

Footnotes

  1. No successful run was found on main (0f38cf1) during the generation of this report, so 2ccce25 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@9aoy 9aoy enabled auto-merge (squash) October 17, 2025 05:35
@9aoy 9aoy merged commit 0c7c731 into main Oct 17, 2025
91 of 96 checks passed
@9aoy 9aoy deleted the rstest branch October 17, 2025 05:53
9aoy added a commit that referenced this pull request Oct 17, 2025
LingyuCoder pushed a commit that referenced this pull request Oct 17, 2025
Revert "test: migrate config tests to rstest (#11895)"

This reverts commit 0c7c731.
9aoy added a commit that referenced this pull request Oct 17, 2025
9aoy added a commit that referenced this pull request Oct 20, 2025
* Revert "test: Revert 'migrate config tests to rstest (#11895)' (#11902)"

This reverts commit 1ff04bd.

* test: throw stepSignal error

* test: run afterExecute after check

* chore: bump rstest

---------

Co-authored-by: LingyuCoder <[email protected]>
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