openclaw/src/plugin-sdk/subpaths.test.ts
2026-03-04 01:20:48 -05:00

46 lines
1.8 KiB
TypeScript

import * as compatSdk from "openclaw/plugin-sdk/compat";
import * as discordSdk from "openclaw/plugin-sdk/discord";
import * as imessageSdk from "openclaw/plugin-sdk/imessage";
import * as lineSdk from "openclaw/plugin-sdk/line";
import * as signalSdk from "openclaw/plugin-sdk/signal";
import * as slackSdk from "openclaw/plugin-sdk/slack";
import * as whatsappSdk from "openclaw/plugin-sdk/whatsapp";
import { describe, expect, it } from "vitest";
describe("plugin-sdk subpath exports", () => {
it("exports compat helpers", () => {
expect(typeof compatSdk.emptyPluginConfigSchema).toBe("function");
expect(typeof compatSdk.resolveControlCommandGate).toBe("function");
});
it("exports Discord helpers", () => {
expect(typeof discordSdk.resolveDiscordAccount).toBe("function");
expect(typeof discordSdk.discordOnboardingAdapter).toBe("object");
});
it("exports Slack helpers", () => {
expect(typeof slackSdk.resolveSlackAccount).toBe("function");
expect(typeof slackSdk.handleSlackMessageAction).toBe("function");
});
it("exports Signal helpers", () => {
expect(typeof signalSdk.resolveSignalAccount).toBe("function");
expect(typeof signalSdk.signalOnboardingAdapter).toBe("object");
});
it("exports iMessage helpers", () => {
expect(typeof imessageSdk.resolveIMessageAccount).toBe("function");
expect(typeof imessageSdk.imessageOnboardingAdapter).toBe("object");
});
it("exports WhatsApp helpers", () => {
expect(typeof whatsappSdk.resolveWhatsAppAccount).toBe("function");
expect(typeof whatsappSdk.whatsappOnboardingAdapter).toBe("object");
});
it("exports LINE helpers", () => {
expect(typeof lineSdk.processLineMessage).toBe("function");
expect(typeof lineSdk.createInfoCard).toBe("function");
});
});