-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR feedback] Switch combine coverage script to .sh
- Loading branch information
Showing
3 changed files
with
18 additions
and
26 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# Combines Jest code coverage and Cypress code coverage into a single report % | ||
# NOTE: `yarn test-cypress` and `yarn test-unit --coverage` must have already been run | ||
# in order for the correct coverage JSON files to exist and be combined | ||
|
||
# Clean folder and re-import Jest/Cypress JSON coverage reports | ||
rm -rf reports/combined-coverage && mkdir reports/combined-coverage | ||
cp reports/jest-coverage/coverage-final.json reports/combined-coverage/jest-coverage.json | ||
cp reports/cypress-coverage/coverage-final.json reports/combined-coverage/cypress-coverage.json | ||
|
||
# Tell Istanbul to merge the reports in the folder and generate a HTML report | ||
yarn nyc merge reports/combined-coverage reports/combined-coverage/coverage-final.json | ||
yarn nyc report --reporter html --temp-dir reports/combined-coverage --report-dir reports/combined-coverage | ||
|
||
# Open the HTML report for convenience | ||
open reports/combined-coverage/index.html |