Skip to content

Commit c30c619

Browse files
committed
update tests
1 parent e286429 commit c30c619

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/cloudflare/src/cli/build/patches/ast/vercel-og.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ describe("vercelOgFallbackFontRule", () => {
1717
const code = `var fallbackFont = fetch(new URL("./noto-sans-v27-latin-regular.ttf", import.meta.url)).then((res) => res.arrayBuffer());`;
1818
expect(patchCode(code, vercelOgFallbackFontRule)).toMatchInlineSnapshot(`
1919
"async function getFallbackFont() {
20-
return (await import("./noto-sans-v27-latin-regular.ttf.bin")).default
20+
// .bin is used so that a loader does not need to be configured for .ttf files
21+
return (await import("./noto-sans-v27-latin-regular.ttf.bin")).default;
2122
}
2223
23-
var fallbackFont = getFallbackFont()"
24+
var fallbackFont = getFallbackFont();"
2425
`);
2526
});
2627
});

packages/cloudflare/src/cli/build/patches/investigated/patch-vercel-og-library.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ describe("patchVercelOgLibrary", () => {
5757
expect(readFileSync(path.join(openNextVercelOgDir, "index.edge.js"), { encoding: "utf-8" }))
5858
.toMatchInlineSnapshot(`
5959
"async function getFallbackFont() {
60-
return (await import("./noto-sans-v27-latin-regular.ttf.bin")).default
60+
// .bin is used so that a loader does not need to be configured for .ttf files
61+
return (await import("./noto-sans-v27-latin-regular.ttf.bin")).default;
6162
}
6263
63-
var fallbackFont = getFallbackFont()"
64+
var fallbackFont = getFallbackFont();"
6465
`);
6566

6667
expect(readFileSync(openNextOgRoutePath, { encoding: "utf-8" })).toMatchInlineSnapshot(

0 commit comments

Comments
 (0)