From f6f3eecdb3ce21ccdccd8b2c10a74ebd47ad809e Mon Sep 17 00:00:00 2001 From: mbelinky Date: Thu, 19 Feb 2026 10:34:04 +0100 Subject: [PATCH] LINE/Test: tighten temp path type guard (openclaw#20792) thanks @mbelinky --- src/line/download.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/line/download.test.ts b/src/line/download.test.ts index 7354491b71..2e64473b73 100644 --- a/src/line/download.test.ts +++ b/src/line/download.test.ts @@ -45,6 +45,9 @@ describe("downloadLineMedia", () => { expect(result.size).toBe(jpeg.length); expect(result.contentType).toBe("image/jpeg"); expect(typeof writtenPath).toBe("string"); + if (typeof writtenPath !== "string") { + throw new Error("expected string temp file path"); + } expect(result.path).toBe(writtenPath); expect(writtenPath).toContain("line-media-"); expect(writtenPath).toMatch(/\.jpg$/);