I'm trying to create a unit test for my app based in Vue and vue-cli with webpack template.
I read Vue documentation, vue-loader, vue-cli and vue-template/webpack (an more!). When I try to make a unit test for my component, I use this.
const Constructor = Vue.extend(MyComponent)
vm = new Constructor().$mount()
like Vue-template/webpack example and like Vue official
This work fine. but the pronlem is when my component has some props. I try to pass with this
const Constructor = Vue.extend(MyComponent)
vm = new Constructor({
myprop: 10
}).$mount()
And in my unit test, when I try to get this prop, I get undefined. How can I pass prop to my component in unit test?