test: reduce flaky timeouts

This commit is contained in:
Peter Steinberger
2025-12-30 05:27:18 +01:00
parent b5ae2ccc3c
commit b3f2416a09
2 changed files with 4 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ import { normalizeBrowserScreenshot } from "./screenshot.js";
describe("browser screenshot normalization", () => {
it("shrinks oversized images to <=2000x2000 and <=5MB", async () => {
const width = 2800;
const height = 2800;
const width = 2300;
const height = 2300;
const raw = crypto.randomBytes(width * height * 3);
const bigPng = await sharp(raw, { raw: { width, height, channels: 3 } })
.png({ compressionLevel: 0 })
@@ -25,7 +25,7 @@ describe("browser screenshot normalization", () => {
expect(Number(meta.height)).toBeLessThanOrEqual(2000);
expect(normalized.buffer[0]).toBe(0xff);
expect(normalized.buffer[1]).toBe(0xd8);
}, 20_000);
}, 30_000);
it("keeps already-small screenshots unchanged", async () => {
const jpeg = await sharp({

View File

@@ -392,7 +392,7 @@ describe("web auto-reply", () => {
closeResolvers[1]?.({ status: 499, isLoggedOut: false });
await Promise.resolve();
await run;
});
}, 15_000);
it(
"stops after hitting max reconnect attempts",