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
37 lines
762 B
TypeScript
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);
|
|
});
|
|
});
|