mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: call testing lib cleanup afterEach test (#4232)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import "@testing-library/jest-dom"
|
||||
import { cleanup } from "@testing-library/react"
|
||||
import crypto from "crypto"
|
||||
import * as util from "util"
|
||||
import { server } from "./src/testHelpers/server"
|
||||
@@ -22,6 +23,7 @@ beforeAll(() =>
|
||||
// Reset any request handlers that we may add during the tests,
|
||||
// so they don't affect other tests.
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
server.resetHandlers()
|
||||
jest.clearAllMocks()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user