Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Don't escape source output from jscoverage #292

Closed
wants to merge 1 commit into from

10 participants

@mojodna

Using jscoverage 0.5.1 (installed via Homebrew), the html-cov reporter outputs escaped source lines. This updates the template to not escape them.

@vinteo

+1 merging this fix would be great

@bschultheiss

request seems to work fine

@mojodna
@balnagy

+1.

The patch works for me with node.js (0.6.12), jscoverage (0.5.1).

I tried two earlier jscoverage versions but none of them was working with my current node, so I don't know if there is working combination of version without this patch.

@indianburger

+1. Pull this fix would be real helpful

@ryan-roemer

+1 as well. I'm waiting in a fork that has this patch and would love to go back to mainline mocha.

@tj
Owner
tj commented

This issue has been inactive for over 1 month so I'm closing it. If you think it's still an issue re-open. - tjbot

@tj tj closed this
@ryan-roemer

Still an issue for me with current NPM version of mocha. Would love to have this fixed.

@tj tj reopened this
@tj
Owner
tj commented

it does work fine for me with my jscoverage

@ryan-roemer

If you:

$ brew install jscoverage

(which is the fastest path on a Mac), then you'll have the jscoverage version that needs the patch to mocha. And, it might be nice to have mocha support current jscoverage.

Alternately, if there's some one-liner way to install the same jscoverage you have, that would work fine too.

@jockster

This seems related with my issue here, #611

@dudymas

also having this issue. I'd just like to know what I should do to have this work right. I used the "brew install" method that ryan used since npm had compilation errors.

@tj
Owner
tj commented

the npm one isn't mine someone squatted it unfortunately haha.. pretty confusing mess.. ill ask that guy if i can have the name

@tj
Owner
tj commented

nvm.. no issues opened for the fork. @sunfang1cn do you mind if we used jscoverage in npm?

@tj
Owner
tj commented

or if the brew one does work fine I can remove mine, I forget what I had to tweak originally

@dudymas

now you have me curious how in the world you patched it. I'd like to know what you did... but it does sound easier to revert to brew... knowing that the formulas are also themselves open to change, and we could probably fork that brew too. Thanks for looking into this, dude!

Also, have you peeked at all into the jscover fellow that's supposed to overtake jscoverage one day? If it makes more sense and you've seen it as pretty stable, I have bandwidth to play around with hooking the jade template up to it... no guarantees I'd finish.

@tj
Owner
tj commented

brew is really bad for having outdated everything but yeah that would be nice.

tj/node-jscoverage@28c5e87

was the change two years ago i guess haha

@tntim96

Also, have you peeked at all into the jscover fellow that's supposed to overtake jscoverage one day

Let me know if you need anything from JSCover

@tj
Owner
tj commented

i dont have time to test other solutions ATM but if there's something we can basically swap out jscoverage for and keep the rest the same I'm down, we should only have to adjust the global map we reference

@dudymas

@tntim96 thanks for the offer. I'll let you know if I do need anything.

@visionmedia I would also like for there to be a way to create output for grunt so that people can have a step for creating code coverage... if you prefer, I'll try to make the changes separate... one for JSCover support and another for grunt task support.

@tj
Owner
tj commented

-1 for grunt, I couldn't care less about that thing it makes no sense

@dudymas

haha! ok ok. I won't pester you about it. I really just want mocha to support being passed a stream object for output, and having it default to standard out if none is given.

I don't plan on this being built in to exclusively support grunt. I'll just toss you a reply here when I'm done and if you think it might help, I'm happy to issue a pull request. If you only use make in your exploits, then hats off. I'm not so fortunate... gyp is also JSON-ish like grunt, and actually I think MSBuild and ant are both more intuitive with their xml based configs. Probably scons is the only thing I really enjoyed building with, but it's a beast and slow compared to make or ninja.

@tj tj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 26, 2012
  1. @mojodna
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/reporters/templates/coverage.jade
View
6 lib/reporters/templates/coverage.jade
@@ -37,14 +37,14 @@ html
tr.hit
td.line= number
td.hits= line.coverage
- td.source= line.source
+ td.source!= line.source
else if 0 === line.coverage
tr.miss
td.line= number
td.hits 0
- td.source= line.source
+ td.source!= line.source
else
tr
td.line= number
td.hits
- td.source= line.source || ' '
+ td.source!= line.source || ' '
Something went wrong with that request. Please try again.