Also if someone runs into warnings like unknown custom element: <router-link> child component
when using q-item
with routes like <q-item to="/path"></q-item>
, a solution is to stub it to router-link and stub router links again, its hacky but it works
const wrapper = shallowMount(MyComponent, {
localVue,
stubs: {
'q-item': '<router-link to=""></router-link>',
RouterLink: RouterLinkStub
}
})