【发布时间】:2019-05-24 01:05:57
【问题描述】:
我遇到了一个错误,我需要你的帮助。感谢观看这个问题。
我的情况:我正在为我的项目配置 Drone CI 工具,当我在drone.yml 上运行单元测试时得到了这个。
Validation Error:
Module <rootDir>/node_modules/vue-jest in the transform option was not found.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
这是我的jest.conf.js
transform: {
"^.+\\.js$": "babel-jest",
".*\\.vue$": "<rootDir>/node_modules/vue-jest"
},
我尝试过的:
- 删除
<rootDir>/node_modules/。但我收到另一个错误Module vue-jest in the transform option was not found.。所以我认为这不是正确的解决方案
【问题讨论】:
-
修复了吗?这是如何解决的?
-
@Jayan 是的。我找到了解决方案。但是,距离现在太久了,我搬到了新公司。所以我现在不记得了。对不起。
标签: unit-testing vue.js vuejs2 jestjs babel-jest