You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 thatshallowMount
doesn't seem to allow that, whilemount
does.Is there any way to use this technique and still be able to go with
shallowMount
overmount
?What does the proposed API look like?
Not sure
The text was updated successfully, but these errors were encountered: