Unit testing PhpStorm/IntelliJ IDEA在Jest单元测试中不会在断点上中断
我有一个项目,我正在IntelliJ IDEA的变体中工作 我已经使用编写了针对Vue组件的单元测试。我能够从PhpStorm运行我的单元测试。但是,当我调试单元测试时,PhpStorm不会在我放在Vue组件代码中的断点上中断 下面是我在Vue项目的package.json中放置的Jest配置。 为什么PhpStorm没有在我的断点上中断Unit testing PhpStorm/IntelliJ IDEA在Jest单元测试中不会在断点上中断,unit-testing,intellij-idea,vue.js,phpstorm,jestjs,Unit Testing,Intellij Idea,Vue.js,Phpstorm,Jestjs,我有一个项目,我正在IntelliJ IDEA的变体中工作 我已经使用编写了针对Vue组件的单元测试。我能够从PhpStorm运行我的单元测试。但是,当我调试单元测试时,PhpStorm不会在我放在Vue组件代码中的断点上中断 下面是我在Vue项目的package.json中放置的Jest配置。 为什么PhpStorm没有在我的断点上中断 "jest": { "roots": [ "<rootDir>./" ], "moduleFileExtens
"jest": {
"roots": [
"<rootDir>./"
],
"moduleFileExtensions": [
"js",
"vue"
],
"transform": {
".*\\.(vue)$": "jest-vue-preprocessor",
"^.+\\.js$": "babel-jest"
},
"moduleNameMapper": {
"^~/(.*)$": "<rootDir>/../$1"
},
"collectCoverage": true,
"collectCoverageFrom": [
"**/*.{js,vue}",
"!**/node_modules/**"
],
"coverageReporters": [
"html",
"text-summary"
],
"coverageDirectory": "coverage",
"notify": true,
"setupTestFrameworkScriptFile": "./setup.js"
}
没有这个项目很难说。。。我建议在您的Jest配置中设置collectCoverage:false-这有什么区别吗?检测覆盖率代码通常会破坏源映射。您使用的IDE版本是什么?@oksana最新版本,即2018.3即使在关闭覆盖率并添加sourceMaps:true和retainLines:true to之后,仍然会发生。babelrc: