import { TestPath } from '../test_path'; import { Message } from './message'; import { RegisterOptions } from './reporter'; import InternalReporter from './internal_reporter'; /** * CancellableReporter is a reporter mainly for internal use by the suite runner. It * forwards all messages to another reporter, except for when it's been * "cancelled". When the CancellableReporter is cancelled, it will emit "aborted" finish * messages for all currently running tests and then ignore all subsequent * messages. * * This is used in the suite runner to be able to implement cancellation in a * nice way that doesn't require everything to know about cancellation. */ export default class CancellableReporter implements InternalReporter { #private; private reporter; constructor(reporter: InternalReporter); registerTests(tests: TestPath[], options: RegisterOptions): void; registrationFailed(error: Error): void; gotMessage(testPath: TestPath, message: Message): void; done(): void; cancel(): void; isFinished(): boolean; }