-
Notifications
You must be signed in to change notification settings - Fork 386
chore(clerk-js): Convert all Jest tests to Vitest #6798
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
chore(clerk-js): Convert all Jest tests to Vitest #6798
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: e0c8eed The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: jacekradko <[email protected]>
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
@coderabbitai review |
✅ Actions performedReview triggered.
|
globals: pluginJest.environments.globals.globals, | ||
}, | ||
plugins: { | ||
jest: pluginJest, |
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.
🤷
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.
This is a config block for all test files, and we do still have jest in a few packages (for now)
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.
I think all looks good, there are some remaining eslint jest plugins that needs 🧹
This reverts commit e5b7eb7.
This PR completes the migration from Jest to Vitest for all remaining test files in
packages/clerk-js
, converting 53 Jest test files to use Vitest instead.Changes Made
Test File Conversion
.test.ts/tsx
files to.spec.ts/tsx
to follow Vitest conventionsjest.fn()
→vi.fn()
jest.useFakeTimers()
→vi.useFakeTimers()
jest.useRealTimers()
→vi.useRealTimers()
describe
,it
,expect
,vi
)Import Path Updates
testUtils
tovitestUtils
utils/test/createFixtures
toutils/vitest/createFixtures
Configuration Updates
package.json
test script to use only Vitest:"test": "vitest --watch=false"
.spec
filesImpact
The Jest configuration remains in place but no longer finds any test files to run, as all tests now use the
.spec
naming convention that Vitest is configured to handle.Verification
Verified conversion success by running sample tests:
This completes the Jest → Vitest migration for
packages/clerk-js
while preserving all existing test functionality.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io
node index.js --exec install
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.