perf(test): optimize heavy suites and stabilize lock timing

This commit is contained in:
Peter Steinberger
2026-02-13 13:28:23 +00:00
parent 8307f9738b
commit 8899f9e94a
14 changed files with 476 additions and 702 deletions

View File

@@ -51,8 +51,8 @@ describe("web media loading", () => {
it("compresses large local images under the provided cap", async () => {
const buffer = await sharp({
create: {
width: 1600,
height: 1600,
width: 1200,
height: 1200,
channels: 3,
background: "#ff0000",
},
@@ -254,7 +254,7 @@ describe("web media loading", () => {
});
it("falls back to JPEG when PNG alpha cannot fit under cap", async () => {
const sizes = [512, 768, 1024];
const sizes = [320, 448, 640];
let pngBuffer: Buffer | null = null;
let smallestPng: Awaited<ReturnType<typeof optimizeImageToPng>> | null = null;
let jpegOptimized: Awaited<ReturnType<typeof optimizeImageToJpeg>> | null = null;