From b571165315e2e40cb8b068868ee9c929cecf09ec Mon Sep 17 00:00:00 2001 From: SnapOtter Date: Mon, 18 May 2026 18:16:07 +0800 Subject: [PATCH] fix: increase timeout for remaining AVIF conversion tests (#153) Extends the 120s AVIF timeout fix to format-matrix-comprehensive and format-matrix-expanded test files (Integration shard 4/4 failures). --- tests/integration/format-matrix-comprehensive.test.ts | 3 ++- tests/integration/format-matrix-expanded.test.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/format-matrix-comprehensive.test.ts b/tests/integration/format-matrix-comprehensive.test.ts index fb68826a..1762bdb6 100644 --- a/tests/integration/format-matrix-comprehensive.test.ts +++ b/tests/integration/format-matrix-comprehensive.test.ts @@ -927,7 +927,8 @@ describe("Extended conversion targets (core formats)", () => { if (fmt.name.toLowerCase() === target.format) continue; if (fmt.name === "AVIF" && target.format === "avif") continue; - it(`${fmt.name} -> ${target.format}`, async () => { + const testTimeout = target.format === "avif" ? 120_000 : 30_000; + it(`${fmt.name} -> ${target.format}`, { timeout: testTimeout }, async () => { const res = await callTool("convert", fmt, { format: target.format }); if (!res) return; expect(res.statusCode).toBe(200); diff --git a/tests/integration/format-matrix-expanded.test.ts b/tests/integration/format-matrix-expanded.test.ts index afab9b87..c53f84e8 100644 --- a/tests/integration/format-matrix-expanded.test.ts +++ b/tests/integration/format-matrix-expanded.test.ts @@ -851,7 +851,8 @@ describe("SVG-to-raster", () => { const SVG_OUTPUT_FORMATS = ["png", "jpg", "webp", "avif"] as const; for (const outFmt of SVG_OUTPUT_FORMATS) { - it(`converts SVG to ${outFmt}`, async () => { + const testTimeout = outFmt === "avif" ? 120_000 : 30_000; + it(`converts SVG to ${outFmt}`, { timeout: testTimeout }, async () => { const fixturePath = join(FORMATS_DIR, "sample.svg"); if (!existsSync(fixturePath)) return;