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(` + [ + " {