From 2958a8414d0bcbe3ad6ec545970713a258bd2a4e Mon Sep 17 00:00:00 2001 From: Alberto Leal <139499+dashed@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:07:52 +0000 Subject: [PATCH] test(media): narrow result kind before sendResult assertion --- src/infra/outbound/message-action-runner.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/infra/outbound/message-action-runner.test.ts b/src/infra/outbound/message-action-runner.test.ts index f2e6426d2..80d3e5446 100644 --- a/src/infra/outbound/message-action-runner.test.ts +++ b/src/infra/outbound/message-action-runner.test.ts @@ -624,6 +624,9 @@ describe("runMessageAction sandboxed media validation", () => { }); expect(result.kind).toBe("send"); + if (result.kind !== "send") { + throw new Error("expected send result"); + } expect(result.sendResult?.mediaUrl).toBe(tmpFile); } finally { await fs.rm(sandboxDir, { recursive: true, force: true });