- Edit 
package.jsonJest configuration as shown below. The big points are to ensure you have ajsonreporter and to ensure your coverage is stored in a unique directory for unit tests (in this config itscoverage/unit. Also, add the development dependencies shown as they are required for the merge script. - Edit your e2e configuration (
test/jest-e2e.json) as shown below. The required "trick" was to ensure thatrootDir's subtree includes paths for the e2e tests as well as an source you want to generate coverage for. Using the parent directory includes bothtestandsrcso this works. I tried many other methods, like settingcollectCoverageFromto../src, none of them worked. It appears you must use the parent directory and exclude everything you don't want. Note that it also uses a unique directory for its generated coverage data (coverage/e2e). - Add 
merge-coverage.tsshown below to your project and run it after you've ran both test sets generating coverage. 
  
    
      This file contains hidden or 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
    
  
  
    
  | # Change to the project directory | |
| cd $FORGE_SITE_PATH | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin $FORGE_SITE_BRANCH | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/usr/bin/env bash | |
| command -v docker >/dev/null 2>&1 || { echo >&2 "I require Docker but it's not installed. Aborting."; exit 1; } | |
| echo "Basic auth for traefik >= v1.7" | |
| read -p "User: " USER | |
| read -p "Password: " PW | |
| # Pull httpd:alpine image (small and includes httpasswd) | |
| docker pull httpd:alpine >/dev/null 2>&1 |