Skip to content

Commit b9e21dc

Browse files
authored
Change: Show where "flushPromises" comes from
1 parent e4ed37b commit b9e21dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/vue-router.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ console.error node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:211
258258
Again, due to Vue Router 4's new asynchronous nature, we need to `await` the routing to complete before making any assertions. In this case, however, there is not `router.hasNavigated` hook we can await on. One alternative is to use the `flushPromises` function exported from Vue Test Utils:
259259

260260
```js {2,15}
261-
import { mount } from '@vue/test-utils'
261+
import { mount, flushPromises } from '@vue/test-utils'
262262
import { createRouter, createWebHistory } from 'vue-router'
263263

264264
test('routing', async () => {

0 commit comments

Comments
 (0)