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

Add a 'check-coverage' script so we can track towards completion #1820

Closed
wants to merge 2 commits into from

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Sep 17, 2020

(Based on #1819, land that first.)

We are targetting 100% test coverage for npm v7 GA. Using a
coverage-map, we require that any of the newly created tests fully cover
the module that they are testing. However, this has the side effect of
always hitting 100% coverage when running 'npm test', even though not
all modules are being tested.

This adds a new 'load-all' test which, in 'check-coverage' mode, tells
nyc to include every file in the project.

This also removes the double-run of our tests in CI, where we run once
and then immediately run the same exact thing again for Coveralls, and
sends the 'check-coverage' output to Coveralls instead.

@isaacs isaacs requested a review from nlf September 17, 2020 23:04
@isaacs isaacs requested a review from a team as a code owner September 17, 2020 23:04
@isaacs isaacs force-pushed the isaacs/check-coverage branch 2 times, most recently from f874d26 to cdf708c Compare September 17, 2020 23:07
We are targetting 100% test coverage for npm v7 GA.  Using a
coverage-map, we require that any of the newly created tests fully cover
the module that they are testing.  However, this has the side effect of
_always_ hitting 100% coverage when running 'npm test', even though not
all modules are being tested.

This adds a new 'load-all' test which, in 'check-coverage' mode, tells
nyc to include every file in the project.

This also removes the double-run of our tests in CI, where we run once
and then immediately run the same exact thing again for Coveralls, and
sends the 'check-coverage' output to Coveralls instead.
@darcyclarke darcyclarke added semver:major backwards-incompatible breaking changes Release 7.x work is associated with a specific npm 7 release labels Sep 18, 2020
Copy link
Contributor

@nlf nlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super useful for at-a-glance full code base coverage

ruyadorno pushed a commit that referenced this pull request Sep 22, 2020
We are targetting 100% test coverage for npm v7 GA.  Using a
coverage-map, we require that any of the newly created tests fully cover
the module that they are testing.  However, this has the side effect of
_always_ hitting 100% coverage when running 'npm test', even though not
all modules are being tested.

This adds a new 'load-all' test which, in 'check-coverage' mode, tells
nyc to include every file in the project.

This also removes the double-run of our tests in CI, where we run once
and then immediately run the same exact thing again for Coveralls, and
sends the 'check-coverage' output to Coveralls instead.

PR-URL: #1820
Credit: @isaacs
Close: #1820
Reviewed-by: @ruyadorno
@ruyadorno ruyadorno closed this Sep 22, 2020
@darcyclarke darcyclarke added this to the OSS - Sprint 15 milestone Sep 25, 2020
@isaacs isaacs deleted the isaacs/check-coverage branch October 2, 2020 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release 7.x work is associated with a specific npm 7 release semver:major backwards-incompatible breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants