


























@@ -4,7 +4,6 @@ import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types";
44import type { MockFn } from "openclaw/plugin-sdk/plugin-test-runtime";
55import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
66import { vi } from "vitest";
7-import { createNativeCommandTestParams } from "./bot-native-commands.fixture-test-support.js";
87import type { RegisterTelegramNativeCommandsParams } from "./bot-native-commands.js";
98import { registerTelegramNativeCommands } from "./bot-native-commands.js";
109@@ -42,10 +41,6 @@ const pluginCommandMocks = vi.hoisted(() => ({
4241matchPluginCommand: vi.fn<MatchPluginCommandFn>(() => null),
4342executePluginCommand: vi.fn<ExecutePluginCommandFn>(async () => ({ text: "ok" })),
4443}));
45-export const getPluginCommandSpecs = pluginCommandMocks.getPluginCommandSpecs;
46-export const matchPluginCommand = pluginCommandMocks.matchPluginCommand;
47-export const executePluginCommand = pluginCommandMocks.executePluginCommand;
48-4944vi.mock("openclaw/plugin-sdk/plugin-runtime", () => ({
5045getPluginCommandSpecs: pluginCommandMocks.getPluginCommandSpecs,
5146matchPluginCommand: pluginCommandMocks.matchPluginCommand,
@@ -74,13 +69,9 @@ const replyPipelineMocks = vi.hoisted(() => {
7469getAgentScopedMediaLocalRoots: vi.fn<GetAgentScopedMediaLocalRootsFn>(() => []),
7570};
7671});
77-export const dispatchReplyWithBufferedBlockDispatcher =
78-replyPipelineMocks.dispatchReplyWithBufferedBlockDispatcher;
79-8072const deliveryMocks = vi.hoisted(() => ({
8173deliverReplies: vi.fn(async () => {}),
8274}));
83-export const deliverReplies = deliveryMocks.deliverReplies;
84758576vi.mock("./bot-native-commands.runtime.js", () => ({
8677getPluginCommandSpecs: pluginCommandMocks.getPluginCommandSpecs,
@@ -120,7 +111,6 @@ vi.mock("openclaw/plugin-sdk/conversation-runtime", () => ({
120111}));
121112vi.mock("./bot/delivery.js", () => ({ deliverReplies: deliveryMocks.deliverReplies }));
122113vi.mock("./bot/delivery.replies.js", () => ({ deliverReplies: deliveryMocks.deliverReplies }));
123-export { createNativeCommandTestParams };
124114125115export function createNativeCommandsHarness(params?: {
126116cfg?: OpenClawConfig;
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。