Skip to content

Commit

Permalink
test: update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Feb 19, 2024
1 parent 3e6f82d commit ce1f4ae
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ await setup({
rootDir: fileURLToPath(new URL('../playground', import.meta.url)),
})

describe('ssr', async () => {
it('renders the index page', async () => {
describe('providers', async () => {
it('generates inlined font face rules for `google` provider', async () => {
const html = await $fetch('/')
expect(html).toContain('Nuxt module playground!')
for (const font of ['Poppins', 'Raleway', 'Montserrat']) {
expect(html).toContain(`@font-face {\n font-family: '${font}';\n src: local("${font}"), url`)
}
})

it('generates inlined font face rules for `local` provider', async () => {
const html = await $fetch('/')
expect(html).toContain('src: url("/custom-font.woff2") format(woff2)')
})
})

0 comments on commit ce1f4ae

Please sign in to comment.