test(config): cover allowConversationAccess in plugin hooks schema va… · openclaw/openclaw@ca1a6e2
sudhindrat
·
2026-04-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -214,7 +214,23 @@ describe("gateway.controlUi.allowExternalEmbedUrls", () => {
|
214 | 214 | }); |
215 | 215 | |
216 | 216 | describe("plugins.entries.*.hooks", () => { |
217 | | -it("accepts boolean values", () => { |
| 217 | +it.each([true, false])("accepts allowConversationAccess=%s", (allowConversationAccess) => { |
| 218 | +const result = OpenClawSchema.safeParse({ |
| 219 | +plugins: { |
| 220 | +entries: { |
| 221 | +"voice-call": { |
| 222 | +hooks: { |
| 223 | +allowPromptInjection: false, |
| 224 | + allowConversationAccess, |
| 225 | +}, |
| 226 | +}, |
| 227 | +}, |
| 228 | +}, |
| 229 | +}); |
| 230 | +expect(result.success).toBe(true); |
| 231 | +}); |
| 232 | + |
| 233 | +it("accepts allowPromptInjection=false alongside allowConversationAccess=true", () => { |
218 | 234 | const result = OpenClawSchema.safeParse({ |
219 | 235 | plugins: { |
220 | 236 | entries: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。