import type { Config } from '@jest/types' ; import type { Reporter , Test , TestResult , AggregatedResult , Context , ReporterOnStartOptions } from '@jest/reporters' ; module . exports = class CustomJestReporter implements Reporter { public constructor ( globalConfig , options ) { } public onRunStart ( results , options ) { console . log ( ) ; console . log ( `################# Custom Jest reporter: Starting test run #################` ) ; } public onTestStart ( test ) { } public onTestResult ( test , testResult , results ) { console . log ( 'Custom Jest reporter: Reporting test result' ) ; for ( const result of testResult . testResults ) { console . log ( `${ result . title }: ${ result . status }` ) ; } } public onRunComplete ( contexts , results ) { console . log ( '################# Completing test run #################' ) ; console . log ( ) ; } public getLastError ( ) { } } ;