-
Notifications
You must be signed in to change notification settings - Fork 664
Description
What problem does this feature solve?
Please check this example: https://codesandbox.io/s/6zmj357qrn
In my app a have pages designed with various layouts, each layout is a component composed of other tiny components (logo, profile, navigation etc.). A page itself is a component matching a route (e.g. /jobs > Jobs);
So I decided to go with slots:
I have a set of "layout" components describing visual wrappers. And a set of "page" components that describe app's routes.
When I test "page" component's logic, I should not care of "layout" (should be tested separately, right?) So I'd really like to use shallowMount
everywhere and don't stub all the children. The problem is that shallowMount
doesn't seem to allow that, while mount
does.
Is there any way to use this technique and still be able to go with shallowMount
over mount
?
What does the proposed API look like?
Not sure