Skip to content

Commit

Permalink
test: testing library cleanup afterEach
Browse files Browse the repository at this point in the history
  • Loading branch information
nix6839 committed Sep 22, 2023
1 parent 749ee6b commit cf47092
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/vitest-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import '@testing-library/jest-dom/vitest';

import { cleanup } from '@testing-library/react';
import { afterAll, afterEach, beforeAll } from 'vitest';
import { server } from './mocks/server.ts';

Expand All @@ -9,6 +10,7 @@ beforeAll(() => {

afterEach(() => {
server.resetHandlers();
cleanup();
});

afterAll(() => {
Expand Down

0 comments on commit cf47092

Please sign in to comment.