mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
test: ignore SharedComponent
in server head
This commit is contained in:
parent
a0124712f3
commit
510f3e28ff
@ -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<NuxtIslandResponse>('/__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
|
||||
|
Loading…
Reference in New Issue
Block a user