-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
test(core): setup @testing-library/jest-dom and add component test for Box #278
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 664ad09 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 664ad09:
|
declare module "vitest" { | ||
interface Assertion<T> | ||
extends jest.Matchers<void, T>, | ||
TestingLibraryMatchers<T, void> {} | ||
} |
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.
Thank you! LGTM 🎉
@MH4GF Please add a changeset. You can add it from the following link 🙏🏻 |
@kotarella1110 Oh, I added it! 664ad09 |
@MH4GF |
@poteboy Of course! But since the scope of this PR is larger, can I use a different PR? kuma-ui/packages/core/src/components/Spacer/spacer.test.tsx Lines 8 to 10 in 9a565d7
|
Description
This PR will set up @testing-library/jest-dom to be able to use toBeInTheDocument(), etc. in component testing.
Motivation
I was going to try this issue #256, but first I wanted to be able to easily assert that existing usage was not broken.
How was it tested
As a sample test, I have added the test code for the Box component.
If this plan is acceptable, I will expand the test code for other components 👍🏻