-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
test: exclude write-coverage from coverage report #15194
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
!.gitignore | ||
!.gitkeep | ||
!.mailmap | ||
!.nycrc | ||
!.remarkrc | ||
|
||
core | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"exclude": [ | ||
"**/internal/process/write-coverage.js" | ||
], | ||
"reporter": ["html", "text"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does adding the "text" reporter here affect the default output ? Just wondering if results on https://coverage.nodejs.org/ will be affected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mhdawson I don't think it should; @addaleax I think I'm correct on this one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that sounds right to me :) |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the wildcard necessary? It'll always be in lib/internal/process, unless the absolute path is used for comparison?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TimothyGu because the Makefile passes an absolute path for the test coverage's working directory:
--temp-directory "/Users/benjamincoe/bcoe/node/.cov_tmp"
nyc ends up working with the path:
/Users/benjamincoe/bcoe/node/lib_/internal/process/write-coverage.js
when the file is processed by the exclude glob.tldr; we definitely don't want to bake
/Users/benjamincoe/bcoe
into the exclude rule, and it seemed like prefixing with the**
was the easiest solution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bcoe Makes sense 👍