svg-layout-designer-react/src/utils/test-utils.tsx
Siklos 293af45144
All checks were successful
continuous-integration/drone/push Build is passing
Refactor Editor and module functions (#15)
Moved all module functions to separate utils modules

Replaced standard with standard with typescript

Extracted UI elements to separate component

Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/15
2022-08-05 15:38:44 -04:00

20 lines
595 B
TypeScript

/* eslint-disable import/export */
import * as React from 'react';
import { cleanup, render, RenderResult } from '@testing-library/react';
import { afterEach } from 'vitest';
afterEach(() => {
cleanup();
});
const customRender = (ui: React.ReactElement, options = {}): RenderResult =>
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 };