import { ErrorLocation } from '../error_message_util'; import { TestPath } from '../test_path'; import { Message } from './message'; import Reporter from './reporter'; export type Phase = ErrorLocation; /** * PhaseTracker is a very basic reporter (in the sense that it conforms to the * reporter interface) that does nothing but keep track of where a test was * last (ie which hook it was in or if it was in the test). * * It doesn't actually report anything anywhere but it exposes an accessor for * getting the last phase of a test. * * This is useful when showing error messages for tests that time out: It is * helpful to say what timed out. */ export default class PhaseTracker implements Reporter { #private; gotMessage(testPath: TestPath, message: Message): void; getLastPhase(path: TestPath): ErrorLocation | undefined; }