import { append } from "test-progress-tracker"; import { AggregatedResult, TestContext } from "@jest/test-result"; //#region ts/ProgressReporter.d.ts /** * The subset of jest's global config this reporter reads. * * Declared locally rather than `Pick`ed out of `@jest/types`' `Config.GlobalConfig` * because jest 30 renamed `testPathPattern` (a string) to `testPathPatterns` (an array * of strings). Both are accepted here, so the reporter marks a run as filtered on every * jest line it supports instead of silently losing the flag on jest 30. */ export type ProgressReporterConfig = { testNamePattern?: string | undefined; testPathPattern?: string | undefined; testPathPatterns?: string[] | { patterns?: readonly string[]; } | undefined; }; /** * A jest reporter that appends one entry per completed run. * * This is a `reporters` entry, not a `watchPlugins` entry. Jest constructs a custom * reporter as `new Reporter(globalConfig, options, context)` and awaits its * `onRunComplete`, which is why `filtered` is derived in the constructor: that is * where the run's `globalConfig` arrives. Jest builds a fresh scheduler — and so a * fresh reporter — for every run, including each re-run in watch mode, so `filtered` * tracks a pattern the user changes mid-watch instead of being fixed at startup. */ export declare class ProgressReporter { appendTestResult: typeof append; filtered: boolean; constructor(globalConfig?: ProgressReporterConfig); onRunComplete(_testContexts?: Set, results?: AggregatedResult): Promise; } //#endregion //# sourceMappingURL=ProgressReporter.d.ts.map