Skip to content

mount: name slots using text are ignored #992

@shannonarcher

Description

@shannonarcher

Version

1.0.0-beta.25

Reproduction link

https://github.com/shannonarcher/vue-test-utils-bug

Steps to reproduce

git clone git@github.com:shannonarcher/vue-test-utils-bug.git &&
cd vue-test-utils-bug &&
npm i && 
npm run test:unit

What is expected?

According to the docs for the options object when mounting:

Slot

... The value can be either a component, an array of components, or a template string, or text.

When providing a slot containing plain text it should appear in the mounted component as a prop of $slots and replace corresponding named slots content.

What is actually happening?

Plain text slots are ignored when mounting the component using vue-test-utils.


Wrapping any text in a tag will fix this issue however that isn't indicated clearly in the docs and it fails silently.

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