diff --git a/test/basic.test.ts b/test/basic.test.ts index 8602521a80..0e9b2eb2dc 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -2148,7 +2148,7 @@ describe('component islands', () => { result.html = result.html.replace(/ data-island-uid="[^"]*"/g, '') if (isDev()) { - result.head.link = result.head.link?.filter(l => typeof l.href !== 'string' || (!l.href.includes('_nuxt/components/islands/RouteComponent') && !l.href.includes('PureComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */)) + result.head.link = result.head.link?.filter(l => typeof l.href !== 'string' || (!l.href.includes('_nuxt/components/islands/RouteComponent') && !l.href.includes('PureComponent') && !l.href.includes('SharedComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */)) } expect(result).toMatchInlineSnapshot(` @@ -2170,7 +2170,7 @@ describe('component islands', () => { }), })) if (isDev()) { - result.head.link = result.head.link?.filter(l => typeof l.href !== 'string' || (!l.href.includes('_nuxt/components/islands/LongAsyncComponent') && !l.href.includes('PureComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */)) + result.head.link = result.head.link?.filter(l => typeof l.href !== 'string' || (!l.href.includes('_nuxt/components/islands/LongAsyncComponent') && !l.href.includes('PureComponent') && !l.href.includes('SharedComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */)) } result.html = result.html.replaceAll(/ (data-island-uid|data-island-component)="([^"]*)"/g, '') expect(result).toMatchInlineSnapshot(` @@ -2228,7 +2228,7 @@ describe('component islands', () => { }), })) if (isDev()) { - result.head.link = result.head.link?.filter(l => typeof l.href === 'string' && !l.href.includes('PureComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */ && (!l.href.startsWith('_nuxt/components/islands/') || l.href.includes('AsyncServerComponent'))) + result.head.link = result.head.link?.filter(l => typeof l.href === 'string' && !l.href.includes('PureComponent') && !l.href.includes('SharedComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */ && (!l.href.startsWith('_nuxt/components/islands/') || l.href.includes('AsyncServerComponent'))) } result.props = {} result.components = {} @@ -2253,7 +2253,7 @@ describe('component islands', () => { it('render server component with selective client hydration', async () => { const result = await $fetch('/__nuxt_island/ServerWithClient') if (isDev()) { - result.head.link = result.head.link?.filter(l => typeof l.href !== 'string' || (!l.href.includes('_nuxt/components/islands/LongAsyncComponent') && !l.href.includes('PureComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */)) + result.head.link = result.head.link?.filter(l => typeof l.href !== 'string' || (!l.href.includes('_nuxt/components/islands/LongAsyncComponent') && !l.href.includes('PureComponent') && !l.href.includes('SharedComponent') /* TODO: fix dev bug triggered by previous fetch of /islands */)) if (!result.head.link) { delete result.head.link