Disclaimer: I am pretty new to Vue, JavaScript, and web frameworks in general.
I'm trying to familiarise myself with some basic unit and component tests using Jest and vue-test-utils.
I have read the docs on vue-test-utils
' mount() and shallowMount()
, but I'm not sure when to use the one over the other (they appear to be very similar).
According to the docs on shallowMount()
:
Like mount, it creates a Wrapper that contains the mounted and rendered Vue component, but with stubbed child components.
What exactly is meant by "stubbed child components"?
Can mount()
and shallowMount()
be used interchangeably?