Fix incorrect types between testing library and vitest

This commit is contained in:
Alejandro Celaya
2023-05-27 12:29:03 +02:00
parent 12a05b422d
commit d14aea708e
77 changed files with 69 additions and 206 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -20,8 +20,6 @@ describe('<DateIntervalDropdownItems />', () => {
return { user, ...renderResult };
};
afterEach(vi.clearAllMocks);
it('renders expected amount of items', async () => {
await setUp();

View File

@@ -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);

View File

@@ -22,8 +22,6 @@ describe('<DateRangeSelector />', () => {
return result;
};
afterEach(vi.clearAllMocks);
it('renders proper amount of items', async () => {
const { container } = await setUp();