chore(@vant/cli): 修复vue-jest生成sourcemap导致jest生成覆盖率失败 #7188
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BUG_REPORT:
使用@vant/cli迁移项目运行
yarn test
命令提示如下错误经过排查,发现是
vue-jest
为了测试方便在编码过程中为代码添加了source-map代码,但是在jest@25.x
之后默认也会添加上source-map代码。解决方案
升级
vue-jest@4.0.0-rc.0
,在这个版本中,去掉了vue-jest
添加source-map的逻辑相关issue
error: "don't know how to turn this value into a node" when using code coverage
[BREAKING CHANGE] remove inline source-map on process() output