Skip to content

Failed to mount when returning render function from setup() #1484

@LeBenLeBen

Description

@LeBenLeBen

Version

1.0.0-beta.32

Reproduction link

https://github.com/sduduzog/vue-composition-api-tsx-example

Steps to reproduce

  1. Clone the repo
  2. Update the package.json to have the latest @vue/test-utils version, current is 1.0.0-beta.32
  3. Install dependencies
  4. Run npm run test:unit

What is expected?

The component "HelloWorld" should be properly mounted.

What is actually happening?

The component doesn't mount with the following error:

Failed to mount component: template or render function not defined.


This is actually a cross-post from vuejs/composition-api#151. I’m looking for help to resolve this issue where render functions returned from the composition api setup functions are not properly set while mounted through vue-test-utils.

At this point I’m wondering if vue-test-utils is the problem here or if it’s totally unrelated. And if it is, I would appreciate some guidance about where to look next to debug it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions