I have imported custom vue 3 components in the main.js file which gets imported when I create my app:
import { components } from 'components'
Object.values(components).forEach(component => {
app.component(component.name.toString(), component)
})
Which works fine on the app, but when testing I get the following errors:
Failed to resolve component: If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
Since these are vue 3 components and not native I am a little lost and wonder if this error is misleading. I have been searching for answers on how to resolve this.
I saw the following articles:
How to set compilerOptions.isCustomElement for VueJS 3 in Laravel project
I am not sure if this will solve the issue, if anyone knows let me know. In the meantime I am trying to register the components in the test in a global set up file like in the first article, which will be included and run before the tests
Since we are not using jest, I can't find a suitable method.
My set up does not include Jest, but has mocha and chai.
Let me know if anyone has any thoughts?