mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 15:20:23 +00:00
33 lines
935 B
TypeScript
33 lines
935 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import type { OpenClawConfig } from "./runtime-api.js";
|
|
import { zaloMessageActions } from "./actions.js";
|
|
|
|
describe("zaloMessageActions.describeMessageTool", () => {
|
|
it("honors the selected Zalo account during discovery", () => {
|
|
const cfg: OpenClawConfig = {
|
|
channels: {
|
|
zalo: {
|
|
enabled: true,
|
|
botToken: "root-token",
|
|
accounts: {
|
|
default: {
|
|
enabled: false,
|
|
botToken: "default-token",
|
|
},
|
|
work: {
|
|
enabled: true,
|
|
botToken: "work-token",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
expect(zaloMessageActions.describeMessageTool?.({ cfg, accountId: "default" })).toBeNull();
|
|
expect(zaloMessageActions.describeMessageTool?.({ cfg, accountId: "work" })).toEqual({
|
|
actions: ["send"],
|
|
capabilities: [],
|
|
});
|
|
});
|
|
});
|