-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: ✅ use
userEvent
v14 api instead of v13
- Loading branch information
1 parent
a913997
commit e9d4e4f
Showing
3 changed files
with
23 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { cleanup, render } from '@testing-library/react' | ||
import userEvent from '@testing-library/user-event' | ||
import { afterEach } from 'vitest' | ||
|
||
afterEach(() => { | ||
cleanup() | ||
}) | ||
|
||
const customRender = (ui: React.ReactElement, options = {}) => { | ||
return { | ||
user: userEvent.setup(), | ||
...render(ui, { | ||
wrapper: ({ children }) => children, | ||
...options, | ||
}), | ||
} | ||
} | ||
|
||
export * from '@testing-library/react' | ||
export { customRender as render } |
e9d4e4f
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.
Successfully deployed to the following URLs:
react-starter – ./
react-starter-jimmy-guzman.vercel.app
react-starter-plum.vercel.app
react-starter-git-main-jimmy-guzman.vercel.app