Skip to content

named slots not rendering in children of other components with shallowMount #1413

@vetruvet

Description

@vetruvet

Version

1.0.0-beta.31

Reproduction link

https://github.com/vetruvet/vue-test-utils-child-with-slots-bug

Steps to reproduce

Install dependencies then npm test.

What is expected?

Expect all test cases in the spec to pass.

More specifically, I would expect components with named slots to render their slots regardless of where they are in the component hierarchy.

What is actually happening?

shallowMount test with a component with named slots inside of another component fails because it does not render its slots.

In cases where the component with named slots is not inside another component, the slot rendering works as expected.


In beta.30, none of the shallowMount tests using the component with two slots pass. I think this may have something to do with supporting the new v-slot syntax which was added in beta.31.

Potentially related to #1307, but it's not the same issue because that one does not relate to the new v-slot changes in beta.31. However, I think #1309 may address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions