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