test(extensions): move config regression coverage

This commit is contained in:
Peter Steinberger
2026-04-20 21:50:29 +01:00
parent 5927eb73ec
commit 49b2ec1e2e
6 changed files with 152 additions and 158 deletions

View File

@@ -44,6 +44,21 @@ describe("telegram custom commands schema", () => {
});
describe("telegram topic agentId schema", () => {
it("accepts nested groupPolicy overrides", () => {
expectTelegramConfigValid({
groups: {
"-1001234567890": {
groupPolicy: "open",
topics: {
"42": {
groupPolicy: "disabled",
},
},
},
},
});
});
it("accepts valid agentId in forum group topic config", () => {
const res = TelegramConfigSchema.safeParse({
groups: {
@@ -237,6 +252,15 @@ describe("telegram token schema", () => {
});
describe("telegram poll actions schema", () => {
it("accepts editMessage and createForumTopic actions", () => {
expectTelegramConfigValid({
actions: {
editMessage: true,
createForumTopic: false,
},
});
});
it("accepts actions.poll", () => {
expectTelegramConfigValid({ actions: { poll: false } });
});