mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-08 23:43:59 +00:00
fix(control-ui): drop unused vitest import and bind captured request in terminal-connection test
This commit is contained in:
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user