Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing location of SpecRunner breaks code coverage #18

Closed
robianmcd opened this issue Oct 11, 2013 · 2 comments · May be fixed by holvonix-open/wkt-parser#6
Closed

Changing location of SpecRunner breaks code coverage #18

robianmcd opened this issue Oct 11, 2013 · 2 comments · May be fixed by holvonix-open/wkt-parser#6

Comments

@robianmcd
Copy link

If I change the outfile to something like this:

outfile: 'target/_SpecRunner.html'

Then the code coverage starts looking for all my javascript one directory above where it is actually located. The resulting error messages look like this:

Warning: Unable to read "../javascript/services/englishStrings.js" file (Error code: ENOENT). Use --force to continue.

Anyone else getting this issue?
Thanks!
Rob

@williamrjribeiro
Copy link

I'm also having the same problem but I haven't figured it out yet. But I found out that grunt-jasmine 0.5.2 had a fix for a kid of similar issue:
gruntjs/grunt-contrib-jasmine#68

Probably the jasmine-istanbul has to update.

@nukefusion
Copy link

I also came across this issue and I believe it's the aforementioned grunt-jasmine fix that's caused this. Jasmine now creates the list of source files with paths relative to the outdir. The istanbul template then uses these paths to copy the sources for instrumentation, however it does that from the context of the grunt CWD. Because the paths are now relative to the outdir and not the grunt CWD, if the CWD and outdir are at different levels the sources can't be found.

As a result this change probably has ramifications for any jasmine template that enumerates the source files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants