diff --git a/test/basic.test.ts b/test/basic.test.ts
index 1051bc86ce..3f408d7a51 100644
--- a/test/basic.test.ts
+++ b/test/basic.test.ts
@@ -1444,7 +1444,7 @@ describe('server components/islands', () => {
await page.getByText('Go to page without lazy server component').click()
const text = await page.innerText('pre')
- expect(text).toMatchInlineSnapshot('" End page
This is a .server (20ms) async component that was very long ...
42
This is a .server (20ms) async component that was very long ...
42
"')
+ expect(text).toMatchInlineSnapshot('" End page This is a .server (20ms) async component that was very long ...
42
Sugar Counter 12 x 1 = 12
The component bellow is not a slot but declared as interactive
This is a .server (20ms) async component that was very long ...
42
Sugar Counter 12 x 1 = 12
The component bellow is not a slot but declared as interactive
"')
expect(text).toContain('async component that was very long')
// Wait for all pending micro ticks to be cleared
@@ -1650,7 +1650,7 @@ describe('app config', () => {
})
})
-describe('component islands', () => {
+describe.only('component islands', () => {
it('renders components with route', async () => {
const result: NuxtIslandResponse = await $fetch('/__nuxt_island/RouteComponent?url=/foo')
@@ -1660,13 +1660,16 @@ describe('component islands', () => {
expect(result).toMatchInlineSnapshot(`
{
+ "chunks": {},
"head": {
"link": [],
"style": [],
},
"html": " Route: /foo
",
+ "props": {},
"state": {},
+ "teleports": {},
}
`)
})
@@ -1681,15 +1684,18 @@ describe('component islands', () => {
result.head.link = result.head.link.filter(l => !l.href.includes('@nuxt+ui-templates') && (l.href.startsWith('_nuxt/components/islands/') && l.href.includes('_nuxt/components/islands/LongAsyncComponent')))
}
expect(result).toMatchInlineSnapshot(`
- {
- "head": {
- "link": [],
- "style": [],
- },
- "html": " count is above 2
that was very long ...
3
hello world !!!
fallback slot -- index: 0
fallback slot -- index: 1
fallback slot -- index: 2
fall slot -- index: 0
wonderful fallback
back slot -- index: 1
wonderful fallback
",
- "state": {},
- }
- `)
+ {
+ "chunks": {},
+ "head": {
+ "link": [],
+ "style": [],
+ },
+ "html": " count is above 2
that was very long ...
3
hello world !!!
fallback slot -- index: 0
fallback slot -- index: 1
fallback slot -- index: 2
fall slot -- index: 0
wonderful fallback
back slot -- index: 1
wonderful fallback
",
+ "props": {},
+ "state": {},
+ "teleports": {},
+ }
+ `)
})
it('render .server async component', async () => {
@@ -1702,15 +1708,26 @@ describe('component islands', () => {
result.head.link = result.head.link.filter(l => !l.href.includes('@nuxt+ui-templates') && (l.href.startsWith('_nuxt/components/islands/') && l.href.includes('_nuxt/components/islands/AsyncServerComponent')))
}
expect(result).toMatchInlineSnapshot(`
- {
- "head": {
- "link": [],
- "style": [],
- },
- "html": " This is a .server (20ms) async component that was very long ...
2
",
- "state": {},
- }
- `)
+ {
+ "chunks": {
+ "SugarCounter": "_nuxt/SugarCounter.vue.d67a99b8.js",
+ },
+ "head": {
+ "link": [],
+ "style": [],
+ },
+ "html": " This is a .server (20ms) async component that was very long ...
2
Sugar Counter 12 x 1 = 12
The component bellow is not a slot but declared as interactive
",
+ "props": {
+ "SugarCounter-5rNaTHATD9": {
+ "multiplier": 1,
+ },
+ },
+ "state": {},
+ "teleports": {
+ "SugarCounter-5rNaTHATD9": " Sugar Counter 12 x 1 = 12
",
+ },
+ }
+ `)
})
it('renders pure components', async () => {