Skip to content Skip to sidebar Skip to footer

Vue-test-utils Wrapper Undefined

I have the following test suite in Jest for a component. I have successfully written unit tests for several other components that follow a similar structure: import { createLocalVu

Solution 1:

I was in a similar situation where the wrapper would come back undefined.

While testing, you have to give the component everything it needs to render.

It was (as @Adam Freymiller has already alluded to) that all the required values (props, store values, etc) were not set in the test, so the component would error out, much like how it would in a real life scenario.

Post a Comment for "Vue-test-utils Wrapper Undefined"