fix: resolve no-base-to-string lint in subscribe test mock

This commit is contained in:
kumarabhirup 2026-02-21 11:03:50 -08:00
parent d20b67c370
commit c554828f6a
No known key found for this signature in database
GPG Key ID: DB7CA2289CAB0167

View File

@ -34,7 +34,7 @@ vi.mock("../gateway/client.js", () => {
async request(method: string, params?: Record<string, unknown>) {
if (method === "agent.subscribe") {
const sessionKey = String(params?.sessionKey ?? "");
const sessionKey = typeof params?.sessionKey === "string" ? params.sessionKey : "";
const onEvent = this.opts.onEvent as ((evt: Record<string, unknown>) => void) | undefined;
onEvent?.({
event: "agent",