mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:11:23 +00:00
refactor: migrate messaging plugins to sdk
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { extractMessagingToolSend } from "./pi-embedded-subscribe.tools.js";
|
||||
import { setActivePluginRegistry } from "../plugins/runtime.js";
|
||||
import { createTestRegistry } from "../test-utils/channel-plugins.js";
|
||||
import { telegramPlugin } from "../../extensions/telegram/src/channel.js";
|
||||
|
||||
describe("extractMessagingToolSend", () => {
|
||||
beforeEach(() => {
|
||||
setActivePluginRegistry(
|
||||
createTestRegistry([{ pluginId: "telegram", plugin: telegramPlugin, source: "test" }]),
|
||||
);
|
||||
});
|
||||
|
||||
it("uses channel as provider for message tool", () => {
|
||||
const result = extractMessagingToolSend("message", {
|
||||
action: "send",
|
||||
|
||||
Reference in New Issue
Block a user