Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 5ac9408

Browse files
committed
[jest] Don't upload empty runs
1 parent 2e34191 commit 5ac9408

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

packages/jest-plugin/src/reporter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,11 @@ export default class UnflakableReporter extends BaseReporter {
453453
.filter((runRecord) => runRecord.attempts.length > 0)
454454
);
455455

456+
if (results.length === 0) {
457+
debug("No results to report to Unflakable");
458+
return;
459+
}
460+
456461
let branch = branchOverride.value,
457462
commit = commitOverride.value;
458463

packages/jest-plugin/test/integration/src/skipTests.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ integrationTestSuite(() => {
9494
quarantineMode: "skip_tests",
9595
},
9696
expectQuarantinedTestsToBeSkipped: true,
97+
expectResultsToBeUploaded: false,
9798
skipFailures: true,
9899
testNamePattern: "should be quarantined",
99100
},

packages/jest-plugin/test/integration/src/testNamePattern.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ integrationTestSuite(() => {
3232
it("use --testNamePattern with no matches", () =>
3333
integrationTest({
3434
params: {
35+
expectResultsToBeUploaded: false,
3536
skipFailures: true,
3637
testNamePattern: "no matches",
3738
},

0 commit comments

Comments
 (0)