Skip to content

render a async component child #2104

Open
@4dr1en

Description

@4dr1en

Subject of the issue

I'm unable to properly test whether a component renders correctly when it uses defineAsyncComponent to lazily load a child component.
When I mount the parent component with vue-test-utils, the child component is never mounted.

Steps to reproduce

https://stackblitz.com/edit/github-iogvrfxn?file=src%2Fcomponents%2F__tests__%2FHelloWorld.spec.ts

Expected behaviour

The component shoud be visible when I use 'wrapper.html()'

Actual behaviour

The asyn component is never loaded

Possible Solution

What are the alternative solutions? Please describe what else you have considered?

I tried tu use Suspense and flushPromises without success

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