1
votes

I am working on a Vue Application which has nested components.

I am using Jest for writing Unit test cases.

While executing unit test cases on a parent component, i noticed the child components are not loaded.

I am using shallow rendering in test suites.

Please share any links or tutorials on this topic.

Thanks

1

1 Answers

1
votes

a) Use mount instead of shallow

b) Import the child component at the top of the spec.js file, just as you did with the parent