Skip to content

Commit db2cc57

Browse files
committed
test: tighten media ssrf result assertion
1 parent 95b936f commit db2cc57

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/media-understanding/media-understanding-misc.test.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,17 @@ describe("media understanding attachments SSRF", () => {
8585
ssrfPolicy: { allowRfc2544BenchmarkRange: true },
8686
});
8787

88-
await expect(
89-
allowedCache.getBuffer({ attachmentIndex: 0, maxBytes: 1024, timeoutMs: 1000 }),
90-
).resolves.toMatchObject({ mime: "image/jpeg" });
88+
const result = await allowedCache.getBuffer({
89+
attachmentIndex: 0,
90+
maxBytes: 1024,
91+
timeoutMs: 1000,
92+
});
93+
expect(result).toStrictEqual({
94+
buffer: Buffer.from("image"),
95+
mime: "image/jpeg",
96+
fileName: "file.jpg",
97+
size: 5,
98+
});
9199
expect(fetchSpy).toHaveBeenCalledTimes(1);
92100
});
93101

0 commit comments

Comments
 (0)