Skip to content

Cannot stub sub-child-component on mounted #682

Closed
@trollepierre

Description

@trollepierre

Version

1.0.0-beta.16

Reproduction link

https://codesandbox.io/s/9z96nkvyor

Steps to reproduce

My TestComponent has a ChildComponent that I want to test (to add in my snapshot, because it's a slot template)
My ChildComponent contains an AppHeader, that I want to stub (so my snap should not depend on it)
I am mounting with some stubs:

const wrapper = mount(TestComponent, {
        stubs,
      });
const stubs = {
        AppHeader: '<div class="stub-appheader"/>'
      };

But the AppHeader is not stubbed in my test

What is expected?

I expect to generate a component with sub-component that can be stubbed

What is actually happening?

Sub-component are not stubbed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions