fix(control-ui): drop unused vitest import and bind captured request in terminal-connection test

This commit is contained in:
Peter Steinberger
2026-07-04 03:44:04 -07:00
parent 6aeb0575cf
commit d41cb3aab8

View File

@@ -1,4 +1,4 @@
import { describe, expect, it, vi } from "vitest";
import { describe, expect, it } from "vitest";
import { TerminalConnection, type TerminalGatewayClient } from "./terminal-connection.ts";
/** Fake gateway client that records requests and lets tests push events. */
@@ -263,7 +263,7 @@ describe("TerminalConnection", () => {
// The server finalizes the session (emitting terminal.exit) before it
// responds to terminal.close, so the event arrives with no sink.
const baseRequest = client.request;
const baseRequest = client.request.bind(client);
client.request = ((method: string, params: unknown) => {
if (method === "terminal.close") {
client.emit("terminal.exit", {