mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:41:25 +00:00
chore: Fix types in tests 43/N.
This commit is contained in:
@@ -151,16 +151,14 @@ describe("before_tool_call hook deduplication (#15502)", () => {
|
||||
sessionKey: "main",
|
||||
});
|
||||
const [def] = toToolDefinitions([wrapped]);
|
||||
const extensionContext = {} as Parameters<typeof def.execute>[3];
|
||||
|
||||
const args: Parameters<typeof def.execute> = [
|
||||
const extensionContext = {} as Parameters<typeof def.execute>[4];
|
||||
await def.execute(
|
||||
"call-dedup",
|
||||
{ url: "https://example.com" },
|
||||
undefined,
|
||||
extensionContext,
|
||||
undefined,
|
||||
];
|
||||
await def.execute(...args);
|
||||
extensionContext,
|
||||
);
|
||||
|
||||
expect(hookRunner.runBeforeToolCall).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
@@ -200,16 +198,8 @@ describe("before_tool_call hook integration for client tools", () => {
|
||||
onClientToolCall,
|
||||
{ agentId: "main", sessionKey: "main" },
|
||||
);
|
||||
const extensionContext = {} as Parameters<typeof tool.execute>[3];
|
||||
|
||||
const args: Parameters<typeof tool.execute> = [
|
||||
"client-call-1",
|
||||
{ value: "ok" },
|
||||
undefined,
|
||||
extensionContext,
|
||||
undefined,
|
||||
];
|
||||
await tool.execute(...args);
|
||||
const extensionContext = {} as Parameters<typeof tool.execute>[4];
|
||||
await tool.execute("client-call-1", { value: "ok" }, undefined, undefined, extensionContext);
|
||||
|
||||
expect(onClientToolCall).toHaveBeenCalledWith("client_tool", {
|
||||
value: "ok",
|
||||
|
||||
Reference in New Issue
Block a user