Skip to content

test: migrate Vitest tests to Rstest#7929

Merged
chenjiahan merged 3 commits intomainfrom
rstest-vitest
Nov 27, 2025
Merged

test: migrate Vitest tests to Rstest#7929
chenjiahan merged 3 commits intomainfrom
rstest-vitest

Conversation

@9aoy
Copy link
Copy Markdown
Contributor

@9aoy 9aoy commented Nov 27, 2025

Summary

migrate vitest tests to rstest

  • migrate vitest tests to rstest
  • use rstest projects instead of legacy vitestRunAll
  • use path-serializer instead of createSnapshotSerializer helper in @scripts/vitest-config https://www.npmjs.com/package/path-serializer
  • use Unit Test (macOS/Windows) workflow instead of Unit Test (vitest - macOS/Windows) workflow, and we will migrate jest tests to rstest later

before:

the main reason is that the vitest version and testing methods in modern.js are outdated.

img_v3_02se_6023a08a-3a16-4e77-9411-1f964d3112bg

after:
img_v3_02se_93973c92-30fa-4229-af0d-81468ecfb6fg

Related Links

https://rstest.rs/guide/migration/vitest

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 27, 2025

⚠️ No Changeset found

Latest commit: c76c3a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 27, 2025

Rsdoctor Bundle Diff Analysis

📁 bundle-diff

Path: benchmark/bundle-diff/dist/rsdoctor-data.json

📌 Baseline Commit: 8a30828c2e | PR: #7922

Metric Current Baseline Change
📊 Total Size 497.5 KB 497.5 KB 0 B (0.0%)
📄 JavaScript 487.6 KB 487.6 KB 0 B (0.0%)
🎨 CSS 1.2 KB 1.2 KB 0 B (0.0%)
🌐 HTML 5.9 KB 5.9 KB 0 B (0.0%)
📁 Other Assets 2.8 KB 2.8 KB 0 B (0.0%)

📦 Download Diff Report: bundle-diff Bundle Diff

Generated by Rsdoctor GitHub Action

@9aoy 9aoy requested a review from chenjiahan November 27, 2025 07:51
@chenjiahan chenjiahan merged commit e2fe6b6 into main Nov 27, 2025
10 checks passed
@chenjiahan chenjiahan deleted the rstest-vitest branch November 27, 2025 07:53
@chenjiahan chenjiahan changed the title test: migrate vitest tests to rstest test: migrate Vitest tests to Rstest Nov 27, 2025
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