19 lines
499 B
TypeScript
19 lines
499 B
TypeScript
import { cleanup, render } from '@testing-library/react';
|
|
import { afterEach } from 'vitest';
|
|
|
|
afterEach(() => {
|
|
cleanup();
|
|
});
|
|
|
|
const customRender = (ui: React.ReactElement, options = {}) =>
|
|
render(ui, {
|
|
// wrap provider(s) here if needed
|
|
wrapper: ({ children }) => children,
|
|
...options,
|
|
});
|
|
|
|
export * from '@testing-library/react';
|
|
export { default as userEvent } from '@testing-library/user-event';
|
|
// override render export
|
|
export { customRender as render };
|