mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 23:14:31 +00:00
chore: Fix types in tests 24/N.
This commit is contained in:
@@ -56,7 +56,7 @@ describe("registerTelegramNativeCommands", () => {
|
||||
command: vi.fn(),
|
||||
} as unknown as Parameters<typeof registerTelegramNativeCommands>[0]["bot"],
|
||||
cfg,
|
||||
runtime: {} as RuntimeEnv,
|
||||
runtime: {} as unknown as RuntimeEnv,
|
||||
accountId,
|
||||
telegramCfg: {} as TelegramAccountConfig,
|
||||
allowFrom: [],
|
||||
@@ -132,7 +132,7 @@ describe("registerTelegramNativeCommands", () => {
|
||||
},
|
||||
command: vi.fn(),
|
||||
} as unknown as Parameters<typeof registerTelegramNativeCommands>[0]["bot"],
|
||||
runtime: { log: runtimeLog } as RuntimeEnv,
|
||||
runtime: { log: runtimeLog } as unknown as RuntimeEnv,
|
||||
telegramCfg: { customCommands } as TelegramAccountConfig,
|
||||
nativeEnabled: false,
|
||||
nativeSkillsEnabled: false,
|
||||
@@ -164,15 +164,15 @@ describe("registerTelegramNativeCommands", () => {
|
||||
name: "plug",
|
||||
description: "Plugin command",
|
||||
},
|
||||
]);
|
||||
] as never);
|
||||
pluginCommandMocks.matchPluginCommand.mockReturnValue({
|
||||
command: { key: "plug", requireAuth: false },
|
||||
args: undefined,
|
||||
});
|
||||
} as never);
|
||||
pluginCommandMocks.executePluginCommand.mockResolvedValue({
|
||||
text: "with media",
|
||||
mediaUrl: "/tmp/workspace-work/render.png",
|
||||
});
|
||||
} as never);
|
||||
|
||||
registerTelegramNativeCommands({
|
||||
...buildParams(cfg),
|
||||
|
||||
Reference in New Issue
Block a user