fix: add bindings comment regression test (#23458) (thanks @echoVic)

This commit is contained in:
Peter Steinberger
2026-02-22 11:46:34 +01:00
parent 56f01bc493
commit 812bf7c8e1
2 changed files with 11 additions and 0 deletions

View File

@@ -363,6 +363,16 @@ describe("legacy config detection", () => {
expectedValue: "work",
});
});
it("accepts bindings[].comment on load", () => {
expectValidConfigValue({
config: {
bindings: [{ agentId: "main", comment: "primary route", match: { channel: "telegram" } }],
},
readValue: (config) =>
(config as { bindings?: Array<{ comment?: string }> }).bindings?.[0]?.comment,
expectedValue: "primary route",
});
});
it("rejects session.sendPolicy.rules[].match.provider on load", async () => {
await withTempHome(async (home) => {
const configPath = path.join(home, ".openclaw", "openclaw.json");