Skip to content

Commit 51c01fe

Browse files
committed
coverage only if
1 parent bedae88 commit 51c01fe

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

dist/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26306,10 +26306,9 @@ function main() {
2630626306
let parsedResults = (0, testResultProcessing_1.processTestResults)(JSON.parse(opaOutput));
2630726307
let coverageResults = [];
2630826308
if (runCoverageReport) {
26309-
if (!coverageOutput) {
26310-
throw new Error("Coverage output is undefined.");
26309+
if (coverageOutput) {
26310+
coverageResults = (0, testResultProcessing_1.processCoverageReport)(JSON.parse(coverageOutput));
2631126311
}
26312-
coverageResults = (0, testResultProcessing_1.processCoverageReport)(JSON.parse(coverageOutput));
2631326312
}
2631426313
// At the end of the table, if the reportNoTestFile flag is on, add all the files that didn't have an associated test with it.
2631526314
if (noTestFiles && reportNoTestFiles) {

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ export async function main() {
3737

3838
let coverageResults: ProcessedCoverageResult[] = [];
3939
if (runCoverageReport) {
40-
if (!coverageOutput) {
41-
throw new Error("Coverage output is undefined.");
40+
if (coverageOutput) {
41+
coverageResults = processCoverageReport(JSON.parse(coverageOutput));
4242
}
43-
coverageResults = processCoverageReport(JSON.parse(coverageOutput));
4443
}
4544

4645
// At the end of the table, if the reportNoTestFile flag is on, add all the files that didn't have an associated test with it.

0 commit comments

Comments
 (0)