mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user