Skip to content

Commit a24356f

Browse files
committed
enable jest coverage by setting CI env var, set thresholds
1 parent 34bb03f commit a24356f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ jobs:
2222
run: |
2323
npm install
2424
npm test
25+
env:
26+
CI: true

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ const ENABLE_COVERAGE = !!process.env.CI || !!process.env.COVERAGE;
55
module.exports = {
66
collectCoverage: ENABLE_COVERAGE,
77
coverageDirectory: "coverage/",
8+
coverageThreshold: {
9+
global: {
10+
statements: 95.6,
11+
branches: 89.6,
12+
functions: 99,
13+
lines: 96.1,
14+
},
15+
},
816
projects: [
917
{
1018
displayName: "test",

0 commit comments

Comments
 (0)