test: use lightweight channel status stubs

This commit is contained in:
Peter Steinberger
2026-04-10 18:00:22 +01:00
parent 710a19dd86
commit 56d3f97e23

View File

@@ -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,
},
]),
);