test: clarify cli secret target scope assertions · openclaw/openclaw@76b09fb
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -104,8 +104,9 @@ describe("command secret target ids", () => {
|
104 | 104 | }); |
105 | 105 | |
106 | 106 | expect(scoped.targetIds.size).toBeGreaterThan(0); |
107 | | -expect([...scoped.targetIds].every((id) => id.startsWith("channels.discord."))).toBe(true); |
108 | | -expect([...scoped.targetIds].some((id) => id.startsWith("channels.telegram."))).toBe(false); |
| 107 | +const targetIds = [...scoped.targetIds]; |
| 108 | +expect(targetIds.filter((id) => !id.startsWith("channels.discord."))).toEqual([]); |
| 109 | +expect(targetIds.filter((id) => id.startsWith("channels.telegram."))).toEqual([]); |
109 | 110 | }); |
110 | 111 | |
111 | 112 | it("does not coerce missing accountId to default when channel is scoped", () => { |
@@ -127,7 +128,7 @@ describe("command secret target ids", () => {
|
127 | 128 | |
128 | 129 | expect(scoped.allowedPaths).toBeUndefined(); |
129 | 130 | expect(scoped.targetIds.size).toBeGreaterThan(0); |
130 | | -expect([...scoped.targetIds].every((id) => id.startsWith("channels.discord."))).toBe(true); |
| 131 | +expect([...scoped.targetIds].filter((id) => !id.startsWith("channels.discord."))).toEqual([]); |
131 | 132 | }); |
132 | 133 | |
133 | 134 | it("scopes allowed paths to channel globals + selected account", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。