mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:40:43 +00:00
test(extensions): move config regression coverage
This commit is contained in:
@@ -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 } });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user