You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, shallowMount already do a great job to handle majority of v-slot usages
BUT,
it can't handle the more advance one,
which is called "dynamic slot" in vuetify official doc
let me clarify the problems, shallowMount can handle below cases very well:
CASE_A:v-slot
CASE_B:v-slot:namedSlot
CASE_C:v-slot:scopedSlot="{ someProp }"
but it can't handle v-slot like:
CASE_D:v-slot:item.calories="{ item }"
and what i mean of "it can't handle" is that
i don't need to set stubs API in mounting options for CASE A ~ C
and it just works perfect.
but if i don't set stubs for CASE D, it will fail
Steps to reproduce
u can test this example by using shallowMount
in my case, after executing shallowMount
i will use expect(wrapper.element).toMatchSnapshot()
Expected behaviour
works without problems, just like CASE A ~ C
Actual behaviour
it will say something like "item is undefined" in the case i presented in "Steps to reproduce"
The text was updated successfully, but these errors were encountered:
Subject of the issue
Actually,
shallowMount
already do a great job to handle majority of v-slot usagesBUT,
it can't handle the more advance one,
which is called "dynamic slot" in vuetify official doc
let me clarify the problems,
shallowMount
can handle below cases very well:v-slot
v-slot:namedSlot
v-slot:scopedSlot="{ someProp }"
but it can't handle v-slot like:
v-slot:item.calories="{ item }"
and what i mean of "it can't handle" is that
i don't need to set
stubs
API in mounting options for CASE A ~ Cand it just works perfect.
but if i don't set
stubs
for CASE D, it will failSteps to reproduce
u can test this example by using
shallowMount
in my case, after executing
shallowMount
i will use
expect(wrapper.element).toMatchSnapshot()
Expected behaviour
works without problems, just like CASE A ~ C
Actual behaviour
it will say something like "
item
is undefined" in the case i presented in "Steps to reproduce"The text was updated successfully, but these errors were encountered: