mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 12:11:20 +00:00
test: use lightweight channel status stubs
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { createIMessageTestPlugin } from "../../test/helpers/channels/imessage-test-plugin.js";
|
||||
import { collectStatusIssuesFromLastError } from "../plugin-sdk/status-helpers.js";
|
||||
import { setActivePluginRegistry } from "../plugins/runtime.js";
|
||||
import { createChannelTestPluginBase, createTestRegistry } from "../test-utils/channel-plugins.js";
|
||||
@@ -13,6 +12,14 @@ const signalPlugin = {
|
||||
},
|
||||
};
|
||||
|
||||
const imessagePlugin = {
|
||||
...createChannelTestPluginBase({ id: "imessage" }),
|
||||
status: {
|
||||
collectStatusIssues: (accounts: Parameters<typeof collectStatusIssuesFromLastError>[1]) =>
|
||||
collectStatusIssuesFromLastError("imessage", accounts),
|
||||
},
|
||||
};
|
||||
|
||||
describe("channels command", () => {
|
||||
beforeEach(() => {
|
||||
setActivePluginRegistry(
|
||||
@@ -49,7 +56,7 @@ describe("channels command", () => {
|
||||
{
|
||||
pluginId: "imessage",
|
||||
source: "test",
|
||||
plugin: createIMessageTestPlugin(),
|
||||
plugin: imessagePlugin,
|
||||
},
|
||||
]),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user