Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
Add Jest Code Coverage configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonlal committed Nov 25, 2020
1 parent 820e58b commit de650c0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ npm-debug.log

# dist
/dist

/coverage
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ module.exports = {
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.ts?$',
moduleFileExtensions: ['ts', 'js', 'jsx', 'json', 'node'],
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
},
},
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"prebuild": "rm -rf dist",
"build": "tsc -p tsconfig.json",
"lint": "prettier --write lib",
"test": "jest"
"test": "jest --coverage"
},
"dependencies": {
"rate-limiter-flexible": "2.1.10"
Expand Down

0 comments on commit de650c0

Please sign in to comment.