diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts
index 2715c176075..a8fe32e4c67 100644
--- a/packages/runtime-core/__tests__/hydration.spec.ts
+++ b/packages/runtime-core/__tests__/hydration.spec.ts
@@ -121,14 +121,15 @@ describe('SSR hydration', () => {
test('element with text children', async () => {
const msg = ref('foo')
- const app = mountWithHydration('
foo
', () =>
- h('div', { class: msg.value }, msg.value)
+ const { vnode, container } = mountWithHydration(
+ 'foo
',
+ () => h('div', { class: msg.value }, msg.value)
)
- expect(app.vnode.el).toBe(app.container.firstChild)
- expect(app.container.firstChild!.textContent).toBe('foo')
+ expect(vnode.el).toBe(container.firstChild)
+ expect(container.firstChild!.textContent).toBe('foo')
msg.value = 'bar'
await nextTick()
- expect(app.container.innerHTML).toBe(`bar
`)
+ expect(container.innerHTML).toBe(`bar
`)
})
test('element with elements children', async () => {