When I try using wrapper.findComponent, I get the following error:
ErrorWrapper { selector: { ref: 'loginTab' } }
I have searched online but to no avail. Here is my test code:
describe('Sign-Up Test Cases', () => {
const wrapper = mount(SignUp, {
methods: {
getProv: jest.fn()
},
localVue
})
it('Dialog contains a Login Input Field', () => {
console.log(wrapper.findComponent({ ref: 'loginTab' }))
expect(wrapper.findComponent({ ref: 'loginTab' }))
})
})
localVue is already defined.
Check the it statement where I am using the findComponent function.
UPDATE: Something else I tried.
I tried this and it didn't work.
import Vuetify, {VTab} from 'vuetify/lib'
// Some Code here
console.log(wrapper.findComponent(VTab))
and it didn't work. I got the following error:
ErrorWrapper {selector: [Function: VueComponent]}