svg-layout-designer-react/src/utils/test-utils.tsx
Siklos 1f1babe49f
All checks were successful
continuous-integration/drone/push Build is passing
Implement testing library (#2)
Co-authored-by: Eric NGUYEN <enguyen@techform.fr>
Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/2
2022-08-03 08:45:16 -04:00

20 lines
567 B
TypeScript

/* eslint-disable import/export */
import * as React from 'react';
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 };