Files
openclaw/extensions/zalo/src/actions.test.ts
2026-04-03 11:37:22 -05:00

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: [],
});
});
});