-
Notifications
You must be signed in to change notification settings - Fork 787
lcov.info contains filenames instead of paths for babel6-translated code #512
Comments
I tried generating the report from the coverage.raw.json with I don't understand why the automatic generation does not include the file paths, could it be an internal bug ? |
Thanks for reporting. I am having the same issue. I'm attempting to do a code coverage badge on Coveralls.io. I have Istanbul coverage working with the following command: babel-node ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- --recursive --require ./test/test_helper.js But as you note it ouputs an grep ^SF coverage/lcov.info
SF:constants.js
SF:game.js
SF:game_states.js
SF:utils.js
SF:validate.js These files are in I ran the command @DavidPineauScality provided, and same for me, the report-generated-from-the-report has the correct absolute path. My project is open source if it helps: https://github.com/jbinto/thirtyone-server |
cc: @DavidPineauScality Unfortunately, for me anyway, that only has the appearance of working. When I manually edit the initial https://coveralls.io/builds/4671053/source?filename=src%2Fgame.js But when I re-run the report, sure: I get absolute paths, but it somehow mangles the line numbers: https://coveralls.io/builds/4671018/source?filename=src%2Fgame.js I'm not sure what, exactly, re-running the report does, but here's the diff: https://gist.github.com/jbinto/56064e0056fb4c591c53 Seeing stuff like |
More info: I was able to get everything working for my project by dropping in babel-istanbul: jbinto/thirtyone-server@f2587e0 It correctly uses absolute paths and it gets the right line numbers. I'm not thrilled about using a fork but it'll do for now. |
I believe I have fixed this bug with |
I can confirm upgrading to Thank you for your help @gotwarlost, much appreciated. |
You're welcome. Sorry for the delay. |
Hello, This is also now working for me. Thanks ! |
Hi,
I'm using istanbul with babel's babel-node (version 6) to run coverage statistics collection over my unit tests.
I'm actually using the following command:
Versions of the softwares:
This generated a nice lcov.info file and a nice html report with the right lines reported. The issue is that when I upload lcov.info to a third-party service that needs access to my source repository (codecov.io accessing my github repository), files cannot be found due to a bad file path reported into the lcov.info file.
I tried to look into the configuration file of istanbul, hoping for a life-saving option down -there, but to no avail, since both documentation of the reporting/report-config dictionnary is a bit lacking, and I could not find any sample configuration to guide me.
I know this report is a bit vague, but I can't give access to my repository. At best, I can try to reproduce it in a more confined context/environment.
If I can do anything to help, please tell me, I'll try to provide as much information as I can.
The text was updated successfully, but these errors were encountered: