fix: add 120s timeout to all HEIF/HEIC integration tests for CI

Comprehensively adds { timeout: 120_000 } to every HEIF/HEIC
integration test across 40 test files. HEIF decoding on CI runners
is significantly slower than local, causing sporadic timeouts at
the default 5s or previous 60s limits.
This commit is contained in:
SnapOtter
2026-05-01 19:51:47 +08:00
parent 6a44c455a3
commit d1f2f63453
42 changed files with 465 additions and 361 deletions
+18 -13
View File
@@ -261,7 +261,7 @@ describe("Alpha format fallback", () => {
// ── HEIC input handling ─────────────────────────────────────────
describe("HEIC input", () => {
it("processes HEIC image", async () => {
it("processes HEIC image", { timeout: 120_000 }, async () => {
const HEIC = readFileSync(join(FIXTURES, "test-200x150.heic"));
const res = await postTool(
{ sourceColor: "#808080", targetColor: "#FF0000", tolerance: 50 },
@@ -423,18 +423,23 @@ describe("Target color validation", () => {
// ── HEIF input ─────────────────────────────────────────────────
describe("HEIF input", () => {
it("processes HEIF image (motorcycle.heif)", async () => {
const HEIF = readFileSync(join(FIXTURES, "content", "motorcycle.heif"));
const res = await postTool(
{ sourceColor: "#808080", targetColor: "#FF0000", tolerance: 50 },
HEIF,
"photo.heif",
"image/heif",
);
expect(res.statusCode).toBe(200);
const result = JSON.parse(res.body);
expect(result.downloadUrl).toBeDefined();
}, 60_000);
it(
"processes HEIF image (motorcycle.heif)",
{ timeout: 120_000 },
async () => {
const HEIF = readFileSync(join(FIXTURES, "content", "motorcycle.heif"));
const res = await postTool(
{ sourceColor: "#808080", targetColor: "#FF0000", tolerance: 50 },
HEIF,
"photo.heif",
"image/heif",
);
expect(res.statusCode).toBe(200);
const result = JSON.parse(res.body);
expect(result.downloadUrl).toBeDefined();
},
60_000,
);
});
// ── Animated GIF input ─────────────────────────────────────────