Loading sub-components in VUE utils test

I have been testing sub-components recently where you would be wrapping them within the slots. Such as: And parsing through other subcomponents like so: Now in your jest test file you need to load your component that you’re testing as well as the sub-component. Then with the sub-component imported you need to parse it through…

function pointers

I have been using the javascript to call a function via the attributes like so: This is dooable on cpp too using function pointers, which of course would be more efficient as you wouldn’t need to copy the function over to be called within the other function. Here is the code