Skip to content

Commit

Permalink
add cleanup back
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewHoo committed Mar 11, 2024
1 parent 9057efc commit ce47bab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// context: https://github.com/testing-library/jest-dom/pull/511
import "@testing-library/jest-dom/vitest";
import { cleanup } from "@testing-library/react";
import { afterEach } from "vitest";

// TODO: figure out if this is still necessary:
// @ts-expect-error ignore -- this solves issue where RTL throws this error "this environment not configured for act"
Expand All @@ -13,3 +15,7 @@ global.matchMedia =
removeListener: () => undefined,
};
};

afterEach(() => {
cleanup();
});

0 comments on commit ce47bab

Please sign in to comment.