From ed0038200cc03f2df37e4192cadd02aded24273c 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 1e5c24af06..e131688062 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1831,7 +1831,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(` + [ + " {