From e5e4d295ba14d95ef25c8229f11144694c284d68 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 12 Mar 2025 09:18:57 +0800 Subject: [PATCH] wip(vapor): test cases --- .../runtime-vapor/__tests__/hydration.spec.ts | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/runtime-vapor/__tests__/hydration.spec.ts b/packages/runtime-vapor/__tests__/hydration.spec.ts index d89d5fab3..6ba2bf895 100644 --- a/packages/runtime-vapor/__tests__/hydration.spec.ts +++ b/packages/runtime-vapor/__tests__/hydration.spec.ts @@ -243,21 +243,45 @@ describe('Vapor Mode hydration', () => { test.todo('component with anchor insertion', async () => { const { container, data } = await testHydration( ` - + `, { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
"`, - ) + expect(container.innerHTML).toMatchInlineSnapshot() data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
"`, + expect(container.innerHTML).toMatchInlineSnapshot() + }) + + test.todo('consecutive component with anchor insertion', async () => { + const { container, data } = await testHydration( + ` + `, + { + Child: ``, + }, ) + expect(container.innerHTML).toMatchInlineSnapshot() + + data.value = 'bar' + await nextTick() + expect(container.innerHTML).toMatchInlineSnapshot() }) test.todo('if')