test: centralize channel catalog contracts

This commit is contained in:
Peter Steinberger
2026-04-01 01:51:26 +01:00
parent 85679252c4
commit ba5b373ad4
2 changed files with 8 additions and 8 deletions

View File

@@ -0,0 +1,38 @@
import {
describeBundledMetadataOnlyChannelCatalogContract,
describeChannelCatalogEntryContract,
describeOfficialFallbackChannelCatalogContract,
} from "../../../test/helpers/channels/channel-catalog-contract.js";
describeChannelCatalogEntryContract({
channelId: "msteams",
npmSpec: "@openclaw/msteams",
alias: "teams",
});
const whatsappMeta = {
id: "whatsapp",
label: "WhatsApp",
selectionLabel: "WhatsApp (QR link)",
detailLabel: "WhatsApp Web",
docsPath: "/channels/whatsapp",
blurb: "works with your own number; recommend a separate phone + eSIM.",
};
describeBundledMetadataOnlyChannelCatalogContract({
pluginId: "whatsapp",
packageName: "@openclaw/whatsapp",
npmSpec: "@openclaw/whatsapp",
meta: whatsappMeta,
defaultChoice: "npm",
});
describeOfficialFallbackChannelCatalogContract({
channelId: "whatsapp",
npmSpec: "@openclaw/whatsapp",
meta: whatsappMeta,
packageName: "@openclaw/whatsapp",
pluginId: "whatsapp",
externalNpmSpec: "@vendor/whatsapp-fork",
externalLabel: "WhatsApp Fork",
});