Skip to content

Adds a helper for stubbing component slots

Sam Beckham requested to merge scoped-slot-test-utils into master

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

Availability and Testing

Merge request reports