mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 09:12:42 +00:00
refactor(test-utils): share direct channel plugin test fixture
This commit is contained in:
24
src/test-utils/channel-plugin-test-fixtures.ts
Normal file
24
src/test-utils/channel-plugin-test-fixtures.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { ChannelPlugin } from "../channels/plugins/types.js";
|
||||
|
||||
export function makeDirectPlugin(params: {
|
||||
id: string;
|
||||
label: string;
|
||||
docsPath: string;
|
||||
config: ChannelPlugin["config"];
|
||||
}): ChannelPlugin {
|
||||
return {
|
||||
id: params.id,
|
||||
meta: {
|
||||
id: params.id,
|
||||
label: params.label,
|
||||
selectionLabel: params.label,
|
||||
docsPath: params.docsPath,
|
||||
blurb: "test",
|
||||
},
|
||||
capabilities: { chatTypes: ["direct"] },
|
||||
config: params.config,
|
||||
actions: {
|
||||
listActions: () => ["send"],
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user