From ce1f4ae01f71557c75cbe3b088ec7cb895af8d55 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 19 Feb 2024 23:34:19 +0000 Subject: [PATCH] test: update test cases --- test/basic.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/basic.test.ts b/test/basic.test.ts index 386a383..01277af 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -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)') }) })