Invalid behavior of shallowMount on testing a child component that uses custom v-model
#965
Labels
shallowMount on testing a child component that uses custom v-model
#965
Version
1.0.0-beta.25
Reproduction link
https://github.com/chenxeed/reproduce-bug-vue-test-utils
Steps to reproduce
(Best to clone and try this github repo to reproduce the bugs on running the unit test)
https://github.com/chenxeed/reproduce-bug-vue-test-utils
To reproduce:
v-modelv-modelto pass the props. Make the props as "required"shallowMountto test if the data passed to the child component throughv-modelis working or notWhat is expected?
The test should able to detect the passed data from the parent component to the child component with custom
v-model. This is working inmount, but notshallowMount.What is actually happening?
The value passed from parent component to child component is not detected, and it shows warning "[Vue warn]: Missing required prop" instead.
I need to be able to test this scenario with
shallowMount, because I'm testing a Page component that has a lot of child components and I don't want to render all by usingmount, since I just want to test the Page components logic and its interface with the child components.The text was updated successfully, but these errors were encountered: