Skip to content

Comments

test: Migrate to Vitest#882

Open
timfish wants to merge 12 commits intogetsentry:mainfrom
timfish:timfish/test/vitest
Open

test: Migrate to Vitest#882
timfish wants to merge 12 commits intogetsentry:mainfrom
timfish:timfish/test/vitest

Conversation

@timfish
Copy link
Collaborator

@timfish timfish commented Feb 19, 2026

This PR:

  • Migrates all tests to Vitest
  • I had to change the CI cache keys because changing a package.json resulted in no lock change and a build failure
  • Test usages of the Vite plugin had to add as unknown as vite.Plugin because the Vite versions varied between the plugin and integration tests. This does not impact end users because it will use their Vite version.

@github-actions
Copy link

github-actions bot commented Feb 19, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • test: Migrate to Vitest by timfish in #882

🤖 This preview updates automatically when you update the PR.

@timfish timfish force-pushed the timfish/test/vitest branch 3 times, most recently from 951a498 to abbdcc7 Compare February 19, 2026 14:33
@timfish timfish force-pushed the timfish/test/vitest branch from b215b75 to 844a6b8 Compare February 19, 2026 15:09
@timfish timfish marked this pull request as ready for review February 19, 2026 16:41
@timfish timfish force-pushed the timfish/test/vitest branch from 55800f6 to 00a9df5 Compare February 24, 2026 02:24
@timfish timfish force-pushed the timfish/test/vitest branch from 00a9df5 to 644e5e2 Compare February 24, 2026 02:27
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

fail-fast: false
matrix:
node-version: ["18", "20", "22"]
node-version: [18, 20, 22, 24]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI runs integration tests on unsupported Node 18

High Severity

The test-integration CI matrix includes Node 18 ([18, 20, 22, 24]), but packages/integration-tests/package.json now depends on "vitest": "^4.0.0", which requires Node ^20.0.0 || ^22.0.0 || >=24.0.0. Integration tests running on Node 18 in CI will fail. The PR description explicitly says integration tests are excluded from the Vitest migration to retain Node 18 support, but the migration was applied to them as well.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests seem to be passing fine!

@timfish timfish requested a review from chargome February 24, 2026 23:30
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just double checking: in the descr you mentioned migrating to vitest apart from the integration tests but this pr does migrate them right?

@timfish
Copy link
Collaborator Author

timfish commented Feb 25, 2026

Ah yes, I'll update that!

Just realised this PR doesn't update the e2e snapshots and these didn't run and fail in CI because it's from a fork.

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