mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-18 12:36:20 +00:00
Fix incorrect types between testing library and vitest
This commit is contained in:
@@ -5,8 +5,6 @@ describe('<CopyToClipboardIcon />', () => {
|
||||
const onCopy = vi.fn();
|
||||
const setUp = (text = 'foo') => renderWithEvents(<CopyToClipboardIcon text={text} onCopy={onCopy} />);
|
||||
|
||||
afterEach(vi.clearAllMocks);
|
||||
|
||||
it('wraps expected components', () => {
|
||||
const { container } = setUp();
|
||||
expect(container).toMatchSnapshot();
|
||||
|
||||
@@ -13,8 +13,6 @@ describe('<PaginationDropdown />', () => {
|
||||
return result;
|
||||
};
|
||||
|
||||
afterEach(vi.clearAllMocks);
|
||||
|
||||
it('renders expected amount of items', async () => {
|
||||
await setUp();
|
||||
expect(screen.getAllByRole('menuitem')).toHaveLength(5);
|
||||
|
||||
@@ -20,8 +20,6 @@ describe('<DateIntervalDropdownItems />', () => {
|
||||
return { user, ...renderResult };
|
||||
};
|
||||
|
||||
afterEach(vi.clearAllMocks);
|
||||
|
||||
it('renders expected amount of items', async () => {
|
||||
await setUp();
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@ describe('<DateRangeRow />', () => {
|
||||
<DateRangeRow onEndDateChange={onEndDateChange} onStartDateChange={onStartDateChange} />,
|
||||
);
|
||||
|
||||
afterEach(vi.clearAllMocks);
|
||||
|
||||
it('renders two date inputs', () => {
|
||||
setUp();
|
||||
expect(screen.getAllByRole('textbox')).toHaveLength(2);
|
||||
|
||||
@@ -22,8 +22,6 @@ describe('<DateRangeSelector />', () => {
|
||||
return result;
|
||||
};
|
||||
|
||||
afterEach(vi.clearAllMocks);
|
||||
|
||||
it('renders proper amount of items', async () => {
|
||||
const { container } = await setUp();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user