Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ process.on('uncaughtException', err => {
});

process.on('unhandledRejection', (reason, p) => {
// Avoid double processing of unhandled rejections, this global flag is set by Testplane
if ((global as Record<string, unknown>)['__TESTPLANE_INTERNAL_UNHANDLED_REJECTION_PROCESSED']) {
return;
}
const errorMessage = [
`Unhandled Rejection in ${toolAdapter ? toolAdapter.toolName + ':' : ''}${process.pid}:`,
`Promise: ${JSON.stringify(p)}`,
Expand Down
Loading