Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
fix: wait a tick for mountSuspended (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored Jan 17, 2023
1 parent 59995a9 commit 704b808
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/mount.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount, VueWrapper } from '@vue/test-utils'
import { h, DefineComponent, Suspense } from 'vue'
import { h, DefineComponent, Suspense, nextTick } from 'vue'

import { RouterLink } from './components/RouterLink'

Expand All @@ -16,7 +16,7 @@ export async function mountSuspended<
render: () =>
h(
Suspense,
{ onResolve: () => resolve(vm as any) },
{ onResolve: () => nextTick().then(() => resolve(vm as any)) },
{ default: () => h(component) }
),
},
Expand Down

0 comments on commit 704b808

Please sign in to comment.