Skip to content
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

Migrate from jest to vitest #92

Merged
merged 6 commits into from Jun 4, 2023

Conversation

yo-iwamoto
Copy link
Contributor

@yo-iwamoto yo-iwamoto commented Jun 4, 2023

Issue

#90

Overview

Migrate the test runner from jest to vitest

TODO

  • migrate @kuma-ui/sheet a12258a
  • migrate @kuma-ui/system 1604197
  • migrate @kuma-ui/babel-plugin 6e568bc
  • rm jest a1d97c2
  • extract vitest config to workspace and reuse it (if needed)

Comment

  • For I don't deeply understand about the implementation and the context of this issue, changes may have something wrong. If there are any oversights, please let me know.
  • This task only took me around 20 minutes, so feel free to request the change.

@vercel
Copy link

vercel bot commented Jun 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kuma-ui-website ❌ Failed (Inspect) Jun 4, 2023 2:16pm

@vercel vercel bot temporarily deployed to Preview June 4, 2023 13:03 Inactive

export default defineConfig({
test: {
globals: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

only in @kuma-ui/babel-plugin, globals is set to true for babel-plugin-tester behavior.

@poteboy
Copy link
Member

poteboy commented Jun 4, 2023

@you-5805
I appreciate your efforts on this pull request!

While trying to run the changes locally, I encountered an error with the dependency @ampproject/remapping@2.2.1 being invalid. I noticed that the lockfileVersion in pnpm-lock.yml was changed to '6.1'. Would it be possible to revert this back to '6.0' and remove the settings?

Apart from that, I noticed you mentioned 'extract vitest config to workspace and reuse it (if needed)' in your TODO list. If it's possible to centralize the vitest configuration for reuse, that would be really appreciated.

Once these changes are made, I believe your PR will be good to go. Thank you!

@vercel vercel bot temporarily deployed to Preview June 4, 2023 14:16 Inactive
@yo-iwamoto
Copy link
Contributor Author

@poteboy
Thank you for your review!

The Vercel CI seems to be failing, but I'm unable to check the details🙏
On local, pnpm i --frozen-lockfile, pnpm build, and pnpm test are passed.

Copy link
Member

@poteboy poteboy left a comment

Choose a reason for hiding this comment

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

@you-5805
Thank you for your quick fixes!

No worries about the Vercel CI issue; it's due to an unrelated App Router cache problem that we're currently waiting on a Next.js fix for.

Everything else looks great! I appreciate your help with improving our test setup :)

@poteboy poteboy merged commit 9a9063b into kuma-ui:main Jun 4, 2023
1 of 2 checks passed
@yo-iwamoto yo-iwamoto deleted the 90/migrate-from-jest-to-vitest branch June 4, 2023 14:35
@poteboy poteboy mentioned this pull request Jun 5, 2023
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.

None yet

2 participants