mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
Merged via squash.
Prepared head SHA: 769e90c6af
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
20 lines
879 B
TypeScript
20 lines
879 B
TypeScript
import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/channel-contract";
|
|
import type { ChannelPlugin } from "openclaw/plugin-sdk/core";
|
|
import { loadBundledPluginTestApiSync } from "../../../src/test-utils/bundled-plugin-public-surface.js";
|
|
|
|
type CreateIMessageTestPlugin = (params?: { outbound?: ChannelOutboundAdapter }) => ChannelPlugin;
|
|
|
|
let createIMessageTestPluginCache: CreateIMessageTestPlugin | undefined;
|
|
|
|
function getCreateIMessageTestPlugin(): CreateIMessageTestPlugin {
|
|
if (!createIMessageTestPluginCache) {
|
|
({ createIMessageTestPlugin: createIMessageTestPluginCache } = loadBundledPluginTestApiSync<{
|
|
createIMessageTestPlugin: CreateIMessageTestPlugin;
|
|
}>("imessage"));
|
|
}
|
|
return createIMessageTestPluginCache;
|
|
}
|
|
|
|
export const createIMessageTestPlugin: CreateIMessageTestPlugin = (...args) =>
|
|
getCreateIMessageTestPlugin()(...args);
|