Gatsby Netlify CI

Unit Testing

👈 Back

Add Jest

See this commit for packages and modules needed to UT this gatsby project.

Choose coverage thresholds for your project:

"coverageThreshold": {
  "global": {
    "branches": 50,
    "functions": 50,
    "lines": 50,
    "statements": 50
  }
},

Setup a GitHub Workflow

See this commit where a GitHub workflow was added to:

  1. Checkout the branch
  2. Setup Node and install node_modules
  3. Run Unit Tests
  4. Publish the results contained in the junit.xml
  5. Publish code coverage contained in the lcov.info

This change uses GitHub Actions to publish the results of UTs to pull requests on GitHub as comments.