Skip to content

Commit

Permalink
test: Introduce custom test renderer
Browse files Browse the repository at this point in the history
The new v14 version requires userEvent to be setup before being used.
By having a custom test renderer we will be able to do this once
for all tests.
  • Loading branch information
diogoredin committed Apr 6, 2022
1 parent 78e9a8c commit 34a4ef0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/test.utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { render } from '@testing-library/react'

export const customRender = (ui, options) => ({
...render(ui, {
...options,
}),
})

export * from '@testing-library/react'

export { customRender as render }

0 comments on commit 34a4ef0

Please sign in to comment.