Skip to content

Commit 9775228

Browse files
authored
fix: call testing lib cleanup afterEach test (#4232)
1 parent 65ff604 commit 9775228

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

site/jest.setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import "@testing-library/jest-dom"
2+
import { cleanup } from "@testing-library/react"
23
import crypto from "crypto"
34
import * as util from "util"
45
import { server } from "./src/testHelpers/server"
@@ -22,6 +23,7 @@ beforeAll(() =>
2223
// Reset any request handlers that we may add during the tests,
2324
// so they don't affect other tests.
2425
afterEach(() => {
26+
cleanup()
2527
server.resetHandlers()
2628
jest.clearAllMocks()
2729
})

0 commit comments

Comments
 (0)