Skip to content

Commit

Permalink
Add additional logging to custom reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
allie500 committed Feb 4, 2025
1 parent 2616f4e commit ca2b909
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/e2e-pw/atomic-debug-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ class AtomicDebugReporter implements Reporter {

onTestEnd( test: TestCase, result: TestResult ) {
console.log( `Finished test ${ test.title }: ${ result.status }` );

if ( result.status === 'failed' || result.status === 'timedOut' ) {
console.log( 'First error thrown during test execution:' );
console.log( result.error );

if ( result.errors ) {
console.log( 'All errors thrown during test execution:' );
console.log( result.errors );
}
}
}

onEnd( result: FullResult ) {
Expand Down

0 comments on commit ca2b909

Please sign in to comment.