-
Notifications
You must be signed in to change notification settings - Fork 91
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 CLI doesn't work properly when executed in a sub-directory of the project #498
Comments
Can you try with --allowExternal on the cmd. It would work. |
I'll try but I think it won't: c8 resolves the |
For information, after working on PR #539 and seeing how fixing the current issue would break c8, I created a code coverage tool from scratch that is not affected by the issue : https://www.npmjs.com/package/one-double-zero. Please give it a try if you are affected by the current issue. |
Consider the following project:
src/index.ts
test/index.ts
Depending on where
c8
is executed, the result is quite different:Executed from the root of the project
Executed from the place where the test file is (i.e.
test/
)For information - and maybe it can help - here is the
.nycrc.json
that I use:Let me also add that
nyc
works perfectly regardless of where it is executed - i.e. replacec8
withnyc
in the showcased shell commands and the report is perfect in both case. We educated all our developers too execute coverage as soon as possible and on local tests, and unfortunatelyc8
not supporting this pattern means that we can't migrate to it fromnyc
.Hopefully this is solvable.
The text was updated successfully, but these errors were encountered: