Closed akinnee closed 9 years ago
on windows? or some other OS?
OSX Mavericks
are you sure there are no control characters in the filename? I'm at a complete loss and need some more data to debug - thing is I don't even know what to ask for!
@gotwarlost
I had a short code-review an my first thought was it could be some issue with an regex and \b
.. but afaikt everything looks fine..
Sadly i'm running on 10.6.x and 10.7.x so i probably can't reproduce the issue, but i'll try to give it a shot these days..
regards ~david
The file name is exactly backbone.rpc2.js
, and the spec file is backbone.rpc2_spec.js
. I'm using grunt-contrib-jasmine-istanbul
to make a runner and run istanbul cover, so I'll admit it could actually be an issue with that.
The easiest way for me to debug this is if you create a structurally similar github repo that exhibits the same problem on your box but without the code you want to keep to yourself. Is it possible you could do that?
Actually you can check that project out to this specific commit and run grunt. (make sure you npm install and have grunt install globally) https://github.com/akinnee/Backbone.RPC2/commit/d743e04f3ce7f29f861c34d5c958b5df73e1bca5
I have since removed grunt-contrib-jasmine-istanbul since it wasn't working right, but I'd like to add it back if I can get it working right (in addition to this naming problem, it would also hang and never finish).
I poked around a bit and "must" confirm the issue.
Some setup details:
$ git log --online -n1 #=> d743e04 started generating code coverage reports
$ node --version #=> v0.11.12-pre
Could only have a quick look but could it be an issue in the lib/util/*-writer.js files ?
~david
Were you able to reproduce the issue then? Those writer files are just part of whatever comes with the node modules my project depends on.
Sorry, I haven't had a chance to look at it. Things are crazy at work. I'll get to it soon.
No problem! I was just wondering if @davidlinse's response meant he was able to reproduce the issue.
@akinnee sorry, thought i was clear, but yes, i had the same behavior..
first two characters were stripped from the filename of the written report.
Thanks so much for confirming that @davidlinse.
Can you tell me how to produce coverage reports? I checked out that commit ran npm install
, npm install -g grunt-cli
and grunt
but I couldn't find the lcov-report/
directory anywhere.
(sorry I'm not a grunt/ jasmine user myself so I don't know those tools very well)
Running the default grunt
task will generate istanbul output in backbone.rpc2/coverage/
.
Hm, I also have the same problem, simply using istanbul report
with a coverage.json.
Just tried something: If I use relative filenames, the report filename misses the first 2 chars, also the "All Files" link is wrong, it takes me up into the parent dir. Using absolute filenames, it works just fine.
It seems like with a relative filename, it treats it wrongly as a directory?
Please try istanbul@0.2.5 and see if it fixes your problem. Close the issue if it does :)
Thanks for the diagnosis and the patch!
Please do not use v0.2.5 - it is broken. I have reverted my bad fix for this in v0.2.6
Thanks for your effort. Do you think it's fixed in 0.2.6, or should I wait for a different fix?
After generating some coverage reports for one of my Backbone plugins, the name of the file that istanbul generates is
ckbone.rpc2.js.html
when it should bebackbone.rpc2.js.html
. I have no idea why the first 2 characters are being cut off. The file name reported in coverage/index.html is also wrong.Screenshots: https://www.dropbox.com/s/mmgl9stpfr4i36p/Screenshot%202014-02-19%2012.53.56.png https://www.dropbox.com/s/15o57djc97fys38/Screenshot%202014-02-19%2012.54.11.png