fix: address cubic 4/5 review issues
- Preserve encoding/callback args in stdout.write wrapper (json-output.ts) - Restore global console spy in afterEach (server-connection.test.ts) - Restore console.error spy in afterEach (on-complete-hook.test.ts)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { describe, it, expect, mock, beforeEach, afterEach } from "bun:test"
|
||||
|
||||
const originalConsole = globalThis.console
|
||||
|
||||
const mockServerClose = mock(() => {})
|
||||
const mockCreateOpencode = mock(() =>
|
||||
Promise.resolve({
|
||||
@@ -36,6 +38,10 @@ describe("createServerConnection", () => {
|
||||
globalThis.console = { ...console, log: mockConsoleLog } as typeof console
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
globalThis.console = originalConsole
|
||||
})
|
||||
|
||||
it("attach mode returns client with no-op cleanup", async () => {
|
||||
// given
|
||||
const signal = new AbortController().signal
|
||||
|
||||
Reference in New Issue
Block a user