Closed sevkioruc closed 2 years ago
Hi!
You're rendering TodoList
, not the whole app (with <router-view>
and so on). If you want to test a whole router interaction, please check out https://github.com/testing-library/vue-testing-library/blob/main/src/__tests__/vue-router.js#L15 as example. Notice that App.vue
is the root component of the app, not one of its routes.
Hope it helps!
Hi!
I understood better more then before and will review this example. Thank you so much for your answer.
Hello everyone,
I want to test that clicking item after route to detail page of the item.
Although I looked previous issues about this topic I could not solve problem.
I am using Vue 2, Jest and vue-testing-library and I mocked backend with https://github.com/mswjs/msw