Using the same settings as @Akaryatrh
import Quasar, * as All from 'quasar'
import { shallow, createLocalVue } from '@vue/test-utils'
import Component from '/my/Component/
const localVue = createLocalVue()
localVue.use(Quasar, {components: All, directives: All, plugins: All})
const wrapper = shallow(Component, {
localVue
})
The problem is that the wrapper.html()
now returns undefined. So wrapper.find()
and wrapper.findAll()
always fail.
I’ve play around with the settings and found that if I use
localVue.use(Quasar, { directives: All, plugins: All})
Without using components, the wrapper.html()
would act normally.
If use components: All
or components: ["A", "B" .. ]
, the wrapper.html()
will become undefined.
However, we have to use Quasar components, otherwise Jest will throw the “component not registered correctly” error.
Does anyone facing the same problem? Can you guys successfully use wrapper.html()
, wrapper.find()
and wrapper.findAll()
with this settings?
@vinstah @Jaxon @Akaryatrh