-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve the message when run coverage while there are no tests (#…
…6334) * Improve the message when running coverage while there are no tests fixes #6141 Update the coverage reporting so that it still conforms to the documentation but doesn't throw an error when there are no files matching "global" threshold group (maybe because they are already matched with a path or glob). Also make sure that a file is matched against all matching path and glob threshold groups instead of just one. * use Object.assign * Only mock specific functions exported by istanbul-lib-coverage (instead of the whole module). So that I can use the original createCoverageSummary function to create test data. * Add e2e tests for coverage threshold. I added snapshots for stderr so that I could test the Jest errors raised for each failed threshold group. * revert unnecessary test changes * linting * Replace process.cwd() in stderr snapshot test. * Make the tests more robust by using extractSummary method to compare stderr snapshots. Do a replace on the stderr which has a full path to a failed glob threshold file which won't match when the test runs on windows (appveyor) * move changelog entry
- Loading branch information
1 parent
a5fa590
commit 08cb885
Showing
5 changed files
with
490 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.