From 7f311e7730c6f2805021c5f354f6143069fc97f9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 26 Sep 2024 09:36:38 +0100 Subject: [PATCH] test: fix assertion for style snapshot --- test/basic.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/basic.test.ts b/test/basic.test.ts index 20e645e373..e7b122735d 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1834,7 +1834,13 @@ describe.skipIf(isDev() || isWebpack)('inlining component styles', () => { it('does not load stylesheet for page styles', async () => { const html: string = await $fetch('/styles') - expect(html.match(/]*href="[^"]*\.css">(?: crossorigin)?/g)?.filter(m => m.includes('entry'))?.map(m => m.replace(/\.[^.]*\.css/, '.css'))).toMatchInlineSnapshot(`undefined`) + const cssFiles = html.match(/]*href="[^"]*\.css"/g) + expect(cssFiles?.length).toBeGreaterThan(0) + expect(cssFiles?.filter(m => m.includes('entry'))?.map(m => m.replace(/\.[^.]*\.css/, '.css'))).toMatchInlineSnapshot(` + [ + " {