import type { Reporter, Test, TestResult, AggregatedResult, TestContext, ReporterOnStartOptions, Config } from '@jest/reporters'; import type { HeftConfiguration, IScopedLogger } from '@rushstack/heft'; export interface IHeftJestReporterOptions { heftConfiguration: HeftConfiguration; logger: IScopedLogger; debugMode: boolean; } /** * This custom reporter presents Jest test results using Heft's logging system. * * @privateRemarks * After making changes to this code, it's recommended to use `--debug-heft-reporter` to compare * with the output from Jest's default reporter, to check our output is consistent with typical * Jest behavior. * * For reference, Jest's default implementation is here: * https://github.com/facebook/jest/blob/main/packages/jest-reporters/src/default_reporter.ts */ export default class HeftJestReporter implements Reporter { #private; constructor(jestConfig: Config.GlobalConfig, options: IHeftJestReporterOptions); onTestStart(test: Test): Promise; onTestResult(test: Test, testResult: TestResult, aggregatedResult: AggregatedResult): Promise; onRunStart(aggregatedResult: AggregatedResult, options: ReporterOnStartOptions): Promise; onRunComplete(contexts: Set, results: AggregatedResult): Promise; getLastError(): void; } //# sourceMappingURL=HeftJestReporter.d.ts.map