You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR may break the istanbul coverage html reporter.
when building coverage data in browser:
such as babel-plugin-istanbul will store absolute path path/to/file.vue.js as file path key, but the real path is path/to/file.vue.
functiongetRealpath(n){try{returnrealpathSync(n)||n// <= path/module.vue not found}catch(e){returnn// <= goes here return path/module.vue.js}}
when consuming coverage to build html reporter:
such as istanbul etc. the resourcePath is used by the test coverage reporter to read source file from local disk
Error detail
{ Error: ENOENT: no such file or directory, open
'/builds/path/to/src/components/some-module.vue.js'
You can see the generated file path in browser's console: install babel-plugin-istanbul and put this in .babelrc
"plugins": [
"istanbul"
]
then check window.__coverage__ variable
Maybe we can add a new option for this feature, and not enable by default
Another typescript and remap-istanbul related issue:
use mapFileName config, this will create clean test coverage report (without displaying querystring and transformed extname after source file name) again:
Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!
Refer #1372 (comment)
This PR may break the istanbul coverage html reporter.
when building coverage data in browser:
such as babel-plugin-istanbul will store absolute path
path/to/file.vue.js
as file path key, but the real path ispath/to/file.vue
.https://github.com/istanbuljs/babel-plugin-istanbul/blob/master/src/index.js#L8-L14
when consuming coverage to build html reporter:
such as istanbul etc. the resourcePath is used by the test coverage reporter to read source file from local disk
Error detail
You can see the generated file path in browser's console: install
babel-plugin-istanbul
and put this in.babelrc
then check
window.__coverage__
variableMaybe we can add a new option for this feature, and not enable by default
Another typescript and remap-istanbul related issue:
It's also breaking https://github.com/SitePen/remap-istanbul 's source remap since remap uses extname for filename replacement
see https://github.com/SitePen/remap-istanbul/blob/master/src/CoverageTransformer.js#L144
I found a solution for resolving this issue: SitePen/remap-istanbul#143
use mapFileName config, this will create clean test coverage report (without displaying querystring and transformed extname after source file name) again:
The text was updated successfully, but these errors were encountered: