Vue-Test-Utils Unknown custom element:

Add the router-link stub to the shallow (or shallowMount) method options like this:

const wrapper = shallow(TempComponent, {
     propsData: { temp },
     stubs: ['router-link']
})

or this way:

import { RouterLinkStub } from '@vue/test-utils';

const wrapper = shallow(TempComponent, {
     propsData: { temp },
     stubs: {
         RouterLink: RouterLinkStub
     }
})

The error should go away after you do this.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)