mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:38:27 +00:00
test(media): narrow result kind before sendResult assertion
This commit is contained in:
committed by
Peter Steinberger
parent
8934da785b
commit
2958a8414d
@@ -624,6 +624,9 @@ describe("runMessageAction sandboxed media validation", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(result.kind).toBe("send");
|
expect(result.kind).toBe("send");
|
||||||
|
if (result.kind !== "send") {
|
||||||
|
throw new Error("expected send result");
|
||||||
|
}
|
||||||
expect(result.sendResult?.mediaUrl).toBe(tmpFile);
|
expect(result.sendResult?.mediaUrl).toBe(tmpFile);
|
||||||
} finally {
|
} finally {
|
||||||
await fs.rm(sandboxDir, { recursive: true, force: true });
|
await fs.rm(sandboxDir, { recursive: true, force: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user