Can you guide me on the best way to test functions that are declared inside reactive variables in VUE? Jest specifies that in order to achieve 100% coverage in the component, these functions need to be tested.
For example, consider the function customData which is located within the reactive variable chartOptions:
export default{
name: 'component',
data: function () {
chartOptions: {
customData: function ({ val1 }) {
return val1 > 0 ? val1 * 2 : 0
}
}
}
}
Your assistance would be greatly appreciated!