mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-23 11:28:12 +00:00
Merged via squash.
Prepared head SHA: f77824419e
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);
|
|
});
|
|
});
|