mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:00:43 +00:00
test: clarify cli secret target scope assertions
This commit is contained in:
@@ -104,8 +104,9 @@ describe("command secret target ids", () => {
|
||||
});
|
||||
|
||||
expect(scoped.targetIds.size).toBeGreaterThan(0);
|
||||
expect([...scoped.targetIds].every((id) => id.startsWith("channels.discord."))).toBe(true);
|
||||
expect([...scoped.targetIds].some((id) => id.startsWith("channels.telegram."))).toBe(false);
|
||||
const targetIds = [...scoped.targetIds];
|
||||
expect(targetIds.filter((id) => !id.startsWith("channels.discord."))).toEqual([]);
|
||||
expect(targetIds.filter((id) => id.startsWith("channels.telegram."))).toEqual([]);
|
||||
});
|
||||
|
||||
it("does not coerce missing accountId to default when channel is scoped", () => {
|
||||
@@ -127,7 +128,7 @@ describe("command secret target ids", () => {
|
||||
|
||||
expect(scoped.allowedPaths).toBeUndefined();
|
||||
expect(scoped.targetIds.size).toBeGreaterThan(0);
|
||||
expect([...scoped.targetIds].every((id) => id.startsWith("channels.discord."))).toBe(true);
|
||||
expect([...scoped.targetIds].filter((id) => !id.startsWith("channels.discord."))).toEqual([]);
|
||||
});
|
||||
|
||||
it("scopes allowed paths to channel globals + selected account", () => {
|
||||
|
||||
Reference in New Issue
Block a user