Skip to content

Commit

Permalink
test: adjust css regexp
Browse files Browse the repository at this point in the history
danielroe committed Sep 26, 2024

Verified

This commit was signed with the committer’s verified signature.
danielroe Daniel Roe
1 parent 558be17 commit f8cd4eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/base-url.test.ts
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ describe('custom base URL', async () => {
it('renders font URLs relatively in CSS', async () => {
for (const provider of providers) {
const html = await $fetch<string>(`/foo/providers/${provider}`)
const cssLink = html.match(/<link rel="stylesheet" href="([^"]+)">/)![1]!
const cssLink = html.match(/<link rel="stylesheet" href="([^"]+)"/)![1]!
const css = await $fetch<string>(cssLink)
const fontUrls = css.match(/url\(([^)]+)\)/g)
expect(fontUrls!.every(url => url?.includes('../_fonts'))).toBeTruthy()

0 comments on commit f8cd4eb

Please sign in to comment.