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

Missing files using c8 report on windows #183

Open
j03m opened this issue Dec 28, 2019 · 3 comments
Open

Missing files using c8 report on windows #183

j03m opened this issue Dec 28, 2019 · 3 comments

Comments

@j03m
Copy link
Collaborator

j03m commented Dec 28, 2019

I'm observing that we are ignoring certain files from the coverage report on windows due to a quirk in the way test-exclude works.

When we get here on windows: https://github.com/bcoe/c8/blob/master/lib/report.js#L253

We end up at this block in include/exclude: https://github.com/istanbuljs/test-exclude/blob/master/is-outside-dir-win32.js#L9 (which is for win32)

This code is sensitive to case. :( The fix will need to go there, but I need to get an approval before I can PR.

But in summary, given the case of paths like dir/filename: D:\dev\some\long / d:\dev\some\long\path\to\my.js this code:

return !minimatch(path.resolve(dir, filename), path.join(dir, '**'), dot);

Will return true, incorrectly indicating that the file is outside our cwd, Whereas including nocase in the options (supplied as dot) will correctly return false.

@j03m j03m changed the title Missing files using report on windows Missing files using c8 report on windows Dec 28, 2019
@bcoe bcoe added the bug label Dec 30, 2019
@bcoe
Copy link
Owner

bcoe commented Dec 30, 2019

CC: @coreyfarrell

@coreyfarrell
Copy link

@bcoe I've commented on the test-exclude issue, I need some guidance before I can implement a patch for this issue.

@connor4312
Copy link

I hit this again recently trying to build coverage instrumentation for VS Code's extensions. This is pretty nasty since it seems like V8's coverage reports don't have any specific drive letter casing; I observe both uppercase and lowercase drive letters in the same coverage file.

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

No branches or pull requests

4 participants