Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

执行单元测试时(vue-jest) 引入该包报错 #1

Open
equicy opened this issue Jun 25, 2021 · 5 comments
Open

执行单元测试时(vue-jest) 引入该包报错 #1

equicy opened this issue Jun 25, 2021 · 5 comments

Comments

@equicy
Copy link

equicy commented Jun 25, 2021

node环境 v16.3.0
jest v26.6.3
vue v2.6.11

报错无法找到该包

@yujinpan
Copy link
Owner

yujinpan commented Jun 25, 2021

看一下安装的版本号,还有引入该包的方式

@equicy
Copy link
Author

equicy commented Jun 30, 2021

看一下安装的版本号,还有引入该包的方式

版本号: 1.0.6
引入方式: npm
复现方式,在任意vue文件中有引入,执行jest即可复现

@yujinpan
Copy link
Owner

yujinpan commented Jul 2, 2021

请提供一下控制台报错的截图,我能更好的排查问题。

@equicy
Copy link
Author

equicy commented Jul 8, 2021

屏幕快照 2021-07-08 下午4 43 33

我调试了一下 应该是这个包造成的
import _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';

@equicy
Copy link
Author

equicy commented Jul 8, 2021

我自己写了一个深拷贝来替换里面的copy函数就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants