bcoe / bcoe/c8

Missing files using `c8 report` on windows

Open
#183 3 comments 0 reactions 0 assignees View on GitHub
bug fixed-upstream
Dominant language
JavaScript
Stars
2.1k
Forks
99
PR merge metrics
No merged PRs in 30d

Description

I'm observing that we are ignoring certain files from the coverage report on windows due to a quirk in the way [test-exclude](https://github.com/istanbuljs/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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.