test: complete WP4-07 visual and performance budgets
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 2m34s

This commit is contained in:
suyx
2026-08-04 12:55:25 +08:00
parent 15f7afbe4d
commit c0a8bd6d43
23 changed files with 516 additions and 122 deletions
+2 -2
View File
@@ -9,12 +9,12 @@ describe("TASK-WP4-03 archived FontFace gate", () => {
const loader = new ArchivedFontLoader({
createFace: (family, source) => {
expect(family).toBe("Dada_FONT081");
expect(source).toBe("url(\"/api/v1/assets/public/wp4-fixture-v1/FONT081\")");
expect(source).toBe("url(\"/api/v1/assets/public/p0a-complex-v1/FONT081\")");
return { load };
},
fontSet: { add, check: () => true, ready: Promise.resolve() },
});
await expect(loader.ensure({ fontId: "FONT081", url: "/api/v1/assets/public/wp4-fixture-v1/FONT081" })).resolves.toBe("ready");
await expect(loader.ensure({ fontId: "FONT081", url: "/api/v1/assets/public/p0a-complex-v1/FONT081" })).resolves.toBe("ready");
expect(load).toHaveBeenCalledOnce();
expect(add).toHaveBeenCalledOnce();
expect(loader.status("FONT081")).toBe("ready");