From: daiwei Date: Wed, 13 Aug 2025 07:53:02 +0000 (+0800) Subject: test: add tests for dynamic component in ssr vnode-based slot X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1af4c304a97c252ff3665e78872fa29da61080dc;p=thirdparty%2Fvuejs%2Fcore.git test: add tests for dynamic component in ssr vnode-based slot --- diff --git a/packages/runtime-vapor/__tests__/hydration.spec.ts b/packages/runtime-vapor/__tests__/hydration.spec.ts index 2173894b28..b501f1a580 100644 --- a/packages/runtime-vapor/__tests__/hydration.spec.ts +++ b/packages/runtime-vapor/__tests__/hydration.spec.ts @@ -1263,7 +1263,42 @@ describe('Vapor Mode hydration', () => { ) }) - test.todo('with ssr slot vnode fallback', () => {}) + test('in ssr slot vnode fallback', async () => { + const { container, data } = await testHydration( + ``, + { + Child: ` + `, + }, + ref('foo'), + ) + + expect(formatHtml(container.innerHTML)).toMatchInlineSnapshot( + ` + "
+ foo +
" + `, + ) + + data.value = 'bar' + await nextTick() + expect(formatHtml(container.innerHTML)).toMatchInlineSnapshot( + ` + "
+ bar +
" + `, + ) + }) }) describe('if', () => {