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

absolute paths in windows are not correct. #178

Closed
tswaters opened this issue Aug 23, 2015 · 1 comment · May be fixed by saurabharch/TerraWatts#1, saurabharch/byodb#3, saurabharch/ImVue#1, saurabharch/EBB#1 or saurabharch/HireDot2#4

Comments

@tswaters
Copy link
Contributor

27e0b09 fixed up karma-coverage to generate json files with absolute paths which is definitely a step in the right direction, but the paths are incorrect in windows -- they are coming back with slashes, e.g. C:/something/whatever

I've looked into it a bit and these paths are coming right from karma. I'm not entirely sure why karma is transforming windows paths to use /, but imagine there is likely a good reason for it.

These paths are inconsistent with the outputs from istanbul... The end result is in a generated report combining all json files, all files use a fully absolute path. If path separators are consistent between json files, all files are relative to a common base, and it looks much nicer.

It's not too hard to fix -- simply pass file.originalPath through require.resolve and it will turn slashes back into backslashes and everything looks much nicer.

tswaters added a commit to tswaters/karma-coverage that referenced this issue Aug 23, 2015
dignifiedquire added a commit that referenced this issue Aug 28, 2015
Paths in windows use backslash (fixes #178)
@dignifiedquire
Copy link
Member

Should be fixed in 0.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment