7👍
I was trying to find an answer for a simular issue I was having with my test coverage, I couldn’t get 100% of tests covered coz the default function should be tested. Couldn’t find anything on SO.
After some tryings I got to a solution on how to test the default. Not sure if would help you, but solved my case:
expect(wrapper.vm.$options.props.myObjectProp.default.call()).toEqual([])
expect(wrapper.vm.$options.props.myArrayProp.default.call()).toEqual([])
- [Vuejs]-How can i using swiper.js in vue js
- [Vuejs]-Can't add TimePicker component from 'element-ui' library. How To add it correctly?
Source:stackexchange.com