mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-06-01 10:06:17 +00:00
Moved common test set-up code to helper function
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Placement } from '@popperjs/core';
|
||||
import { InfoTooltip, InfoTooltipProps } from '../../src/utils/InfoTooltip';
|
||||
import { renderWithEvents } from '../__mocks__/setUpTest';
|
||||
|
||||
describe('<InfoTooltip />', () => {
|
||||
const setUp = (props: Partial<InfoTooltipProps> = {}) => ({
|
||||
user: userEvent.setup(),
|
||||
...render(<InfoTooltip placement="right" {...props} />),
|
||||
});
|
||||
const setUp = (props: Partial<InfoTooltipProps> = {}) => renderWithEvents(
|
||||
<InfoTooltip placement="right" {...props} />,
|
||||
);
|
||||
|
||||
it.each([
|
||||
[undefined],
|
||||
|
||||
Reference in New Issue
Block a user