fix(testing): isolate bun module mocks across tests

This commit is contained in:
YeonGyu-Kim
2026-05-30 13:44:54 +09:00
parent 68f02e61ef
commit 78cd34b17b
11 changed files with 642 additions and 63 deletions
@@ -1,4 +1,4 @@
import { afterAll, describe, expect, mock, test } from "bun:test"
import { afterAll, beforeEach, describe, expect, mock, test } from "bun:test"
const logMock = mock(() => {})
@@ -20,6 +20,10 @@ function createClient(abort: (...args: Array<unknown>) => Promise<unknown>): Ope
}
describe("abortWithTimeout", () => {
beforeEach(() => {
logMock.mockClear()
})
afterAll(() => {
mock.restore()
})