From 4be8fd50555fb25ac488b3ed25d4587b679f85b2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 23:48:33 +0100 Subject: [PATCH] test: simplify health account id collection --- src/commands/health.snapshot.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/health.snapshot.test.ts b/src/commands/health.snapshot.test.ts index e298695effc..5db59e8f5b8 100644 --- a/src/commands/health.snapshot.test.ts +++ b/src/commands/health.snapshot.test.ts @@ -95,7 +95,12 @@ function getTelegramChannelConfig(cfg: Record) { function listTelegramAccountIdsForTest(cfg: Record): string[] { const telegram = getTelegramChannelConfig(cfg); const accounts = telegram.accounts as Record | undefined; - const ids = Object.keys(accounts ?? {}).filter(Boolean); + const ids: string[] = []; + for (const accountId of Object.keys(accounts ?? {})) { + if (accountId) { + ids.push(accountId); + } + } return ids.length > 0 ? ids : ["default"]; }