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:
- Checkout the branch
- Setup Node and install node_modules
- Run Unit Tests
- Publish the results contained in the
junit.xml
- 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.