mirror of https://github.com/openclaw/openclaw.git
LINE/Test: tighten temp path type guard (openclaw#20792) thanks @mbelinky
This commit is contained in:
parent
8bfb9d99c3
commit
f6f3eecdb3
|
|
@ -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$/);
|
||||
|
|
|
|||
Loading…
Reference in New Issue