Skip to content

[vue3-jest] - createVNode/createElementVNode is not a function #396

@seba4

Description

@seba4

In my project i have just upgraded to Vue 3 and app is running normally but when i try to run tests i get error:

Component Test.vue) Example1:

<template>
    <div>
    </div>
</template>

Component Test.vue Example2:

<template>
    <div>
        <div>test</div>
    </div>
</template>

I am shallowMounting/mount OverviewOption.vue which has imported Test.vue.

  1. If Test.vue is imported from same folder as OverviewOption.vue both examples are working and tests PASS
  2. If Test.vue is imported from SubModule
    Example1 does not throw error
    Example2 throws an error
    ERROR1: (3.1.0 Vue): createVNode is not a function
    ERROR2 (3.2.19 Vue): _vue.createElementVNode) is not a function

Only difference in OverviewOption.vue:
import Test from 'design-system/components/Test/Test.vue'
import Test from './Test.vue'

Any idea where the problem is or what should i check?

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