mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 14:58:33 +00:00
* adding FE testing documentation * extend radio button tests * update test to work with new user-events lib version * more testing docs
14 lines
367 B
TypeScript
14 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),
|
|
};
|
|
};
|