mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 08:28:52 +00:00
15 lines
367 B
TypeScript
15 lines
367 B
TypeScript
|
|
/**
|
||
|
|
A collection of utilities to enable easier writting of tests
|
||
|
|
*/
|
||
|
|
|
||
|
|
import { render } from "@testing-library/react";
|
||
|
|
import userEvent from "@testing-library/user-event";
|
||
|
|
|
||
|
|
// eslint-disable-next-line import/prefer-default-export
|
||
|
|
export const renderWithSetup = (component: JSX.Element) => {
|
||
|
|
return {
|
||
|
|
user: userEvent.setup(),
|
||
|
|
...render(component),
|
||
|
|
};
|
||
|
|
};
|