Skip to content

Commit

Permalink
feat: add summary message when a test.fail passes all retries (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Chapman Pendery <[email protected]>
  • Loading branch information
cpendery authored Mar 1, 2024
1 parent ce857ca commit 0cd5c5f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/reporter/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,21 @@ export class BaseReporter {
stdStreams
);
});
if (
test.results.every((result) => result.error == null) &&
test.outcome() === "unexpected"
) {
const errorHeader = this._resultColor(test.outcome())(
this._header(test, ` ${failureIdx + 1}) `)
);
process.stdout.write(
"\n" +
errorHeader +
"\n\n" +
padContent("Error: test passed when run with `test.fail`") +
"\n\n"
);
}
});
}

Expand Down

0 comments on commit 0cd5c5f

Please sign in to comment.