test(core): the var() font fallback test no longer waits on Google Fonts (#5623)

This commit is contained in:
Miguel Ángel
2026-10-14 22:19:20 +00:00
committed by GitHub
parent 24a9b78171
commit 8f0bcadcd3
@@ -213,7 +213,13 @@ describe("var() font-family fallbacks", () => {
it("injects the fallback family of an undefined custom property", async () => {
const html = styled(`body { font-family: var(--font-body, Inter, system-ui, sans-serif); }`);
const result = await injectDeterministicFontFaces(html, { allowSystemFontCapture: false });
const fetchImpl = Object.assign(async () => new Response("", { status: 404 }), {
preconnect: fetch.preconnect,
});
const result = await injectDeterministicFontFaces(html, {
fetchImpl,
allowSystemFontCapture: false,
});
expect(result).toContain(`font-family: "Inter";`);
});