Files
Moltbot/src/config/telegram-actions-poll.test.ts
Gustavo Madeira Santana 6dfd39c32f Harden Telegram poll gating and schema consistency (#36547)
Merged via squash.

Prepared head SHA: f77824419e3d166f727474a9953a063a2b4547f2
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-03-05 19:24:43 -05:00

37 lines
762 B
TypeScript

import { describe, expect, it } from "vitest";
import { validateConfigObject } from "./config.js";
describe("telegram poll action config", () => {
it("accepts channels.telegram.actions.poll", () => {
const res = validateConfigObject({
channels: {
telegram: {
actions: {
poll: false,
},
},
},
});
expect(res.ok).toBe(true);
});
it("accepts channels.telegram.accounts.<id>.actions.poll", () => {
const res = validateConfigObject({
channels: {
telegram: {
accounts: {
ops: {
actions: {
poll: false,
},
},
},
},
},
});
expect(res.ok).toBe(true);
});
});