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

c8 report doesn't work on Windows #41

Closed
weswigham opened this issue Nov 13, 2018 · 2 comments · Fixed by #46
Closed

c8 report doesn't work on Windows #41

weswigham opened this issue Nov 13, 2018 · 2 comments · Fixed by #46

Comments

@weswigham
Copy link

  • Version:
    3.2.1
  • Platform:
    Windows 10

c8 report always outputs an empty report block on windows, no matter what include or exclude options you do (or don't) provide. Looking at it, it looks like the coverage files being produced on windows have paths like file:///E:/Github/TypeScript/built/local/tsc.js, which c8 then shortens to /E:/Github/TypeScript/built/local/tsc.js internally, which I'm guessing don't glob match (anything) correctly inside test-exclude, since that's not how windows-style paths are typically rooted (though I'm not sure - that last bit's a guess, since I'm not too familiar with the package).

@fraxken
Copy link

fraxken commented Nov 16, 2018

Hi,

Same problem here on Windows 10. Deleting the last / fixed the problem on my project:

v8ScriptCov.url = v8ScriptCov.url.replace(/^file:\/\/\//, '')

Best Regards,
Thomas

demurgos added a commit to demurgos/c8 that referenced this issue Nov 21, 2018
This commit fixes the conversion from `file://` urls to system-dependent paths. It ensures that it works on Windows and with special characters.

- Closes bcoe#41
- Closes bcoe#45
@sliekens
Copy link

sliekens commented Nov 24, 2018

Same problem, Windows 10 build 1809 (17763.134).

The workaround I use right now involves enabling WSL, installing Ubuntu and then running c8 from a bash prompt.

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