mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 09:30:59 +00:00
chore: fix lint after invoke result handler split
This commit is contained in:
@@ -17,7 +17,6 @@ import {
|
||||
validateNodeDescribeParams,
|
||||
validateNodeEventParams,
|
||||
validateNodeInvokeParams,
|
||||
validateNodeInvokeResultParams,
|
||||
validateNodeListParams,
|
||||
validateNodePairApproveParams,
|
||||
validateNodePairListParams,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { describe, expect, test, vi } from "vitest";
|
||||
import type { RequestFrame } from "./protocol/index.js";
|
||||
import type { GatewayClient, GatewayRequestContext, RespondFn } from "./server-methods/types.js";
|
||||
import { handleNodeInvokeResult } from "./server-methods/nodes.handlers.invoke-result.js";
|
||||
|
||||
describe("late-arriving invoke results", () => {
|
||||
@@ -18,18 +20,18 @@ describe("late-arriving invoke results", () => {
|
||||
] as const;
|
||||
|
||||
for (const params of cases) {
|
||||
const respond = vi.fn();
|
||||
const respond = vi.fn<RespondFn>();
|
||||
const context = {
|
||||
nodeRegistry: { handleInvokeResult: () => false },
|
||||
logGateway: { debug: vi.fn() },
|
||||
} as any;
|
||||
} as unknown as GatewayRequestContext;
|
||||
const client = {
|
||||
connect: { device: { id: nodeId } },
|
||||
} as any;
|
||||
} as unknown as GatewayClient;
|
||||
|
||||
await handleNodeInvokeResult({
|
||||
req: { method: "node.invoke.result" } as any,
|
||||
params: { ...params, nodeId } as any,
|
||||
req: { method: "node.invoke.result" } as unknown as RequestFrame,
|
||||
params: { ...params, nodeId } as unknown as Record<string, unknown>,
|
||||
client,
|
||||
isWebchatConnect: () => false,
|
||||
respond,
|
||||
|
||||
Reference in New Issue
Block a user