diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index 4c7aa911..3f9feb4e 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -9,7 +9,8 @@ import { Suspense, onMounted, defineAsyncComponent, - defineComponent + defineComponent, + createTextVNode } from '@vue/runtime-dom' import { renderToString, SSRContext } from '@vue/server-renderer' @@ -47,6 +48,14 @@ describe('SSR hydration', () => { expect(container.textContent).toBe('bar') }) + test('empty text', async () => { + const { container } = mountWithHydration('
', () => + h('div', createTextVNode('')) + ) + expect(container.textContent).toBe('') + expect(`Hydration children mismatch in