feat: add Vue Router section
afontcu opened this issue · comments
- showcase how to mock Vue Router.
- showcase how to use
router-link-stub
(source). - avoid common pitfalls when trying to assert against a URL.
I would like to work on this one. I learned a lot about the new Vue Router and the pitfalls (see here for example).
I think this article can go something like this:
- example w/o mock
- discuss async routing, flush promises, nextTick
- demonstrate mocking Vue Router
- discuss pros/cons of each approach
Sounds great!
Ping me for a review when you have something. I already had some ideas about things to add so I could help on this one
@posva will do, would be great to get your review. Anything you think is especially important to mention?
Nothing specific but it would be useful being able to change the current location easily
I will hold off on this one until we discuss router testing more here: vuejs/test-utils#152
Closed in #43
We might want to consider adding something about Vue Mock Router: https://github.com/posva/vue-router-mock
Right! Let me create a new issue