mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:00:54 +00:00
refactor: expose channel contract test helpers
This commit is contained in:
@@ -3,7 +3,7 @@ import { clearPluginCommands, registerPluginCommand } from "openclaw/plugin-sdk/
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
let registerTelegramNativeCommands: typeof import("./bot-native-commands.js").registerTelegramNativeCommands;
|
||||
let setActivePluginRegistry: typeof import("openclaw/plugin-sdk/testing").setActivePluginRegistry;
|
||||
let setActivePluginRegistry: typeof import("openclaw/plugin-sdk/plugin-test-runtime").setActivePluginRegistry;
|
||||
let createCommandBot: typeof import("./bot-native-commands.menu-test-support.js").createCommandBot;
|
||||
let createNativeCommandTestParams: typeof import("./bot-native-commands.menu-test-support.js").createNativeCommandTestParams;
|
||||
let createPrivateCommandContext: typeof import("./bot-native-commands.menu-test-support.js").createPrivateCommandContext;
|
||||
@@ -112,7 +112,7 @@ async function registerPairMenu(params: {
|
||||
|
||||
describe("registerTelegramNativeCommands real plugin registry", () => {
|
||||
beforeAll(async () => {
|
||||
({ setActivePluginRegistry } = await import("openclaw/plugin-sdk/testing"));
|
||||
({ setActivePluginRegistry } = await import("openclaw/plugin-sdk/plugin-test-runtime"));
|
||||
({ registerTelegramNativeCommands } = await import("./bot-native-commands.js"));
|
||||
({
|
||||
createCommandBot,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { installChannelActionsContractSuite } from "openclaw/plugin-sdk/channel-test-helpers";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
|
||||
import { describe } from "vitest";
|
||||
import { installChannelActionsContractSuite } from "../../../test/helpers/channels/registry-contract-suites.js";
|
||||
import { telegramPlugin } from "../api.js";
|
||||
|
||||
describe("telegram actions contract", () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { BaseProbeResult, BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract";
|
||||
import { expectDirectoryIds } from "openclaw/plugin-sdk/channel-test-helpers";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
|
||||
import { withEnvAsync } from "openclaw/plugin-sdk/test-env";
|
||||
import { describe, expect, expectTypeOf, it } from "vitest";
|
||||
import { expectDirectoryIds } from "../../../test/helpers/channels/directory-ids.js";
|
||||
import {
|
||||
listTelegramDirectoryGroupsFromConfig,
|
||||
listTelegramDirectoryPeersFromConfig,
|
||||
|
||||
Reference in New Issue
Block a user