From 76b09fbc68007be2c91a60c815cdfd5b552ebd8e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 09:42:01 +0100 Subject: [PATCH] test: clarify cli secret target scope assertions --- src/cli/command-secret-targets.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/command-secret-targets.test.ts b/src/cli/command-secret-targets.test.ts index b8f97d0e594..355593e7a53 100644 --- a/src/cli/command-secret-targets.test.ts +++ b/src/cli/command-secret-targets.test.ts @@ -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", () => {