Skip to content

Commit 934c71c

Browse files
committed
test: allow for global font to be inlined in v4+
1 parent 44cd5e9 commit 934c71c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/base-url.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ describe('custom base URL', async () => {
4444
const cssLink = html.match(/<link rel="stylesheet" href="([^"]+)"/)![1]!
4545
const css = await $fetch<string>(cssLink)
4646
const fontUrls = css.match(/url\(([^)]+)\)/g)
47-
expect(fontUrls!.every(url => url?.includes('../_fonts'))).toBeTruthy()
47+
expect(fontUrls!.every(url =>
48+
url?.includes('../_fonts')
49+
// global (unresolved) font in css from v4 onwards
50+
|| url?.includes('/font-global.woff2'),
51+
)).toBeTruthy()
4852
}
4953
})
5054
})

0 commit comments

Comments
 (0)