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