Adds a helper for stubbing component slots
What does this MR do?
This helper generates a component with only the slots you pass to it. This is useful for writing tests to check your scoped slots are working without having to fully mount the component. e.g.
wrapper = shallowMount(MyComponent, {
store,
propsData: { … },
stubs: {
'my-component': createSlotStub('header-content', 'footer-content'),
}
});
This was needed for a test in !18382 (merged)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content