Skip to content

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

Closed
isaacs wants to merge 2 commits into
release/v7.0.0-betafrom
isaacs/check-coverage
Closed

Add a 'check-coverage' script so we can track towards completion#1820
isaacs wants to merge 2 commits into
release/v7.0.0-betafrom
isaacs/check-coverage

Conversation

@isaacs

Copy link
Copy Markdown
Contributor

(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 nlfSeptember 17, 2020 23:04
@isaacs
isaacs requested a review from a team as a code ownerSeptember 17, 2020 23:04
@isaacs
isaacsforce-pushed the isaacs/check-coverage branch 2 times, most recently from f874d26 to cdf708cCompareSeptember 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.
@isaacs
isaacsforce-pushed the isaacs/check-coverage branch from cdf708c to 1922ef8CompareSeptember 17, 2020 23:10
@darcyclarkedarcyclarke added semver:major backwards-incompatible breaking changes Release 7.x work is associated with a specific npm 7 release labels Sep 18, 2020
nlf
nlf approved these changes Sep 21, 2020

@nlfnlf left a comment

Copy link
Copy Markdown
Contributor

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: @isaacsClose: #1820
Reviewed-by: @ruyadorno
@darcyclarkedarcyclarke 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release 7.xwork is associated with a specific npm 7 releasesemver:majorbackwards-incompatible breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@isaacs@nlf@ruyadorno@darcyclarke