File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+
2+ $expectedTestCoverageSummaryPath = " ./coverage/coverage-summary.json"
3+ if ( -not (Test-Path $expectedTestCoverageSummaryPath ) ) {
4+ Write-Error " No Coverage Summary File Generated"
5+ }
6+
7+ $coverageSummary = Get-Content - Raw - Path $expectedTestCoverageSummaryPath | ConvertFrom-Json
8+ $totalCoverage = $coverageSummary.total.lines.pct
9+ Write-Host " Total coverage: $totalCoverage %"
10+
11+ if ($totalCoverage -lt 85 ) {
12+ Write-Error " Coverage is below 85%"
13+ exit 1
14+ }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Run JESTS on PUSH
22
33on :
44 push :
5- pull_request :
5+ # pull_request:
66
77jobs :
88 test :
Original file line number Diff line number Diff line change 5858 "pretest" : " npm run compile && npm run lint" ,
5959 "lint" : " eslint src" ,
6060 "vscode-test" : " vscode-test" ,
61- "jest-test-summary" : " jest --coverage --coverageReporters='json-summary'" ,
61+ "jest-test-summary" : " jest --coverage --coverageReporters='json-summary' --json --outputFile=coverage/jest-results.json " ,
6262 "jest-test" : " jest --coverage"
6363 },
6464 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments