mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
test(core): the var() font fallback test no longer waits on Google Fonts (#5623)
This commit is contained in:
@@ -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";`);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user