You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
As we start expanding the codebase, we want to ensure that we are creating thorough unit tests for every piece of functionality. While we don't want to enforce a strict 100% line coverage, it helps to have a minimum line requirement to ensure we aren't leaving out big chunks of code.
A good baseline to start with is 80% for all source files. This ensures the majority of our code is covered and leaves room for WIP/untestable code.
Acceptance Criteria
Jest requires a global coverage threshold of 80% for branches, functions, lines, and statements. the npm test command fails if this requirement is not met.
Steps:
Modify the jest configuration to collect coverage from all source files in the /src folder
Add a global coverage threshold of 80%
Modify the npm test command in package.json to run jest --coverage instead of jest
Description
As we start expanding the codebase, we want to ensure that we are creating thorough unit tests for every piece of functionality. While we don't want to enforce a strict 100% line coverage, it helps to have a minimum line requirement to ensure we aren't leaving out big chunks of code.
A good baseline to start with is 80% for all source files. This ensures the majority of our code is covered and leaves room for WIP/untestable code.
Acceptance Criteria
Jest requires a global coverage threshold of 80% for branches, functions, lines, and statements. the
npm test
command fails if this requirement is not met.Steps:
/src
foldernpm test
command inpackage.json
to runjest --coverage
instead ofjest
npm test
displays the coverage reportAdditional Information
The text was updated successfully, but these errors were encountered: