evert "chore: run setup once"

This reverts commit d70ea6a0646549fed81e5566ae380cc13c3a51af.

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-04-04 14:57:42 +02:00
parent 9c4ed43f04
commit e319dcfd3e
@@ -30,7 +30,6 @@ import React from 'react';
import { CatalogGraphPage } from './CatalogGraphPage';
const navigate = jest.fn();
const user = userEvent.setup();
jest.mock('react-router', () => ({
...jest.requireActual('react-router'),
@@ -161,6 +160,7 @@ describe('<CatalogGraphPage/>', () => {
expect(await findAllByTestId('node')).toHaveLength(2);
await userEvent.click(getByText('b:d/e'));
expect(await findByText('hasPart')).toBeInTheDocument();
});
@@ -173,6 +173,7 @@ describe('<CatalogGraphPage/>', () => {
expect(await findAllByTestId('node')).toHaveLength(2);
const user = userEvent.setup();
await user.keyboard('{Shift>}');
await user.click(getByText('b:d/e'));
expect(navigate).toBeCalledWith('/entity/{kind}/{namespace}/{name}');
@@ -216,6 +217,7 @@ describe('<CatalogGraphPage/>', () => {
expect(await findAllByTestId('node')).toHaveLength(2);
const user = userEvent.setup();
await user.keyboard('{Shift>}');
await user.click(getByText('b:d/e'));