From 268d9454709c8557bf6bc765bf109b2f1e438fcb Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Wed, 21 Oct 2026 23:36:34 +0800 Subject: [PATCH] test(web): size the oversized Markdown image past the new image limit The /api/file route bounds files by maxImageBytes, whose default is now 50 MiB, so the 20 MiB + 1 byte fixture no longer exceeded it and the route served it with 200 instead of 413. --- apps/web/tests/markdown-images.e2e.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/tests/markdown-images.e2e.ts b/apps/web/tests/markdown-images.e2e.ts index fd1a329253..32c4c09089 100644 --- a/apps/web/tests/markdown-images.e2e.ts +++ b/apps/web/tests/markdown-images.e2e.ts @@ -179,7 +179,8 @@ describe('web e2e: Markdown image rendering', () => { await writeFile(join(scaffold.workspaceCwd, 'corrupt.png'), 'invalid image') const oversized = await open(join(scaffold.workspaceCwd, 'oversized.png'), 'w') try { - await oversized.truncate(20 * 1024 * 1024 + 1) + // One byte over attachment-local's default maxImageBytes (50 MiB), which also bounds /api/file. + await oversized.truncate(50 * 1024 * 1024 + 1) } finally { await oversized.close() }