Skip to content

Commit 98c730a

Browse files
committed
docs: add note on localVue and Vue Router
1 parent f510fd2 commit 98c730a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/en/guides/using-with-vue-router.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ shallow(Component, {
1818
})
1919
```
2020

21+
> **Note:** Installing Vue Router on a localVue also adds `$route` and `$router` as read-only properties. This means you cannot use the `mocks` option to overwrite `$route` or `$router` when mounting a component using a localVue with VueRouter installed.
22+
2123
## Testing components that use `router-link` or `router-view`
2224

2325
When you install Vue Router, the `router-link` and `router-view` components are registered. This means we can use them anywhere in our application without needing to import them.

0 commit comments

Comments
 (0)