fix: increase timeout for AVIF conversion integration tests (#152)

AVIF encoding is slow in CI without hardware acceleration, causing
SVG->AVIF and WebP->AVIF tests to timeout at 30s. Set 120s timeout
for all AVIF output tests, matching the existing exotic format timeout.
This commit is contained in:
SnapOtter
2026-05-18 17:48:21 +08:00
committed by GitHub
parent 436576fe15
commit 395b93214e
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -682,7 +682,8 @@ describe("Cross-format conversion matrix", () => {
if (inputLower === outFmt) continue;
if (inputLower === "jpeg" && outFmt === "jpg") continue;
it(`${fmt.name} -> ${outFmt}`, async () => {
const testTimeout = outFmt === "avif" ? 120_000 : 30_000;
it(`${fmt.name} -> ${outFmt}`, { timeout: testTimeout }, async () => {
const fixturePath = join(FORMATS_DIR, fmt.file);
if (!existsSync(fixturePath)) return;
+2 -1
View File
@@ -171,7 +171,8 @@ describe("New format support", () => {
for (const outFmt of OUTPUTS) {
const inLower = input.name.toLowerCase();
if (inLower === outFmt || (inLower === "jpeg" && outFmt === "jpg")) continue;
it(`converts ${input.name} to ${outFmt}`, async () => {
const testTimeout = outFmt === "avif" ? 120_000 : 30_000;
it(`converts ${input.name} to ${outFmt}`, { timeout: testTimeout }, async () => {
const fileBuffer = readFileSync(join(FORMATS_DIR, input.file));
const { body, contentType } = createMultipartPayload([
{ name: "file", filename: input.file, contentType: input.mime, content: fileBuffer },