-
-
Notifications
You must be signed in to change notification settings - Fork 56
Double export brakes jest test #60
Comments
I have the same problem! Did you find a workaround? |
@nicolidin , Unfortunately no. I have no idea how to solve that |
Hello, I have the same problem ( // My import
import { VueContext } from 'vue-context'; |
Unfortunately I'm not really sure how to solve that. I normally don't test my JavaScript components and I don't use Nuxt.js, so I'm not familiar with either of them. If anyone out there has any ideas, a PR would be greatly appreciated! |
I've no idea but leaving only that line in the index file
|
Try updating to version 6.0.0. I removed the named export in this version, so maybe that'll help solve this. |
thank you! but the problem persists... |
You could try importing it directly from the source in your test to see if that helps. I know it's not really ideal, but it may help: import VueContext from 'vue-context/src/js/vue-context'; |
My brothers & sisters, I have found the solution for Nuxt.js
import Vue from "vue";
import VueContext from "vue-context";
import "vue-context/dist/css/vue-context.css";
Vue.component("VueContext", VueContext);
Now you can use |
Description
Hello! i faced a strange issue while testing my application. i've got wrapping component named as 'ContextMenu' which contains imported 'vue-context' and renders menu items in a loop. Everything works fine, but jest test fails because vue-context module is exported twice. Here is the error:
Full description of the error - http://prntscr.com/tcirgu
As i understand the problem is in the module here
If needed, the full code of the component:
And the minimal jest test code to reproduce the issue:
Steps to Reproduce
Version
5.2.0
The text was updated successfully, but these errors were encountered: