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

@@ -17,8 +17,6 @@ describe('<RealTimeUpdatesSettings />', () => {
/>,
);
afterEach(vi.clearAllMocks);
it('renders enabled real time updates as expected', () => {
setUp({ enabled: true });

View File

@@ -13,8 +13,6 @@ describe('<ShortUrlCreationSettings />', () => {
/>,
);
afterEach(vi.clearAllMocks);
it.each([
[{ validateUrls: true }, true],
[{ validateUrls: false }, false],

View File

@@ -11,8 +11,6 @@ describe('<ShortUrlsListSettings />', () => {
<ShortUrlsListSettings settings={fromPartial({ shortUrlsList })} setShortUrlsListSettings={setSettings} />,
);
afterEach(vi.clearAllMocks);
it.each([
[undefined, 'Order by: Created at - DESC'],
[{}, 'Order by: Created at - DESC'],

View File

@@ -11,8 +11,6 @@ describe('<TagsSettings />', () => {
<TagsSettings settings={fromPartial({ tags })} setTagsSettings={setTagsSettings} />,
);
afterEach(vi.clearAllMocks);
it('renders expected amount of groups', () => {
setUp();

View File

@@ -11,8 +11,6 @@ describe('<UserInterfaceSettings />', () => {
<UserInterfaceSettings settings={fromPartial({ ui })} setUiSettings={setUiSettings} />,
);
afterEach(vi.clearAllMocks);
it.each([
[{ theme: 'dark' as Theme }, true],
[{ theme: 'light' as Theme }, false],

View File

@@ -10,8 +10,6 @@ describe('<VisitsSettings />', () => {
<VisitsSettings settings={fromPartial(settings)} setVisitsSettings={setVisitsSettings} />,
);
afterEach(vi.clearAllMocks);
it('renders expected components', () => {
setUp();