From 78bbbdec4cb0990790e3da27e6750af5c20dbd45 Mon Sep 17 00:00:00 2001 From: Shakker Date: Fri, 8 May 2026 21:16:07 +0100 Subject: [PATCH] test: tighten security fix account assertion --- src/security/fix.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/security/fix.test.ts b/src/security/fix.test.ts index eb33512c097..4250da21d0a 100644 --- a/src/security/fix.test.ts +++ b/src/security/fix.test.ts @@ -122,7 +122,12 @@ describe("security fix", () => { ) => { const whatsapp = channels.whatsapp; const accounts = whatsapp.accounts as Record>; - expect(accounts[accountId]?.groupPolicy).toBe(expectedPolicy); + const account = accounts[accountId]; + expect(account).toBeDefined(); + if (!account) { + throw new Error(`Expected WhatsApp account ${accountId}`); + } + expect(account.groupPolicy).toBe(expectedPolicy); return accounts; };