import type { EventEmitter } from 'node:events'; import { type Attachment, type Envelope, type GherkinDocument, type Pickle, type TestCase, type TestCaseFinished, type TestStepFinished, type TestStepResult, type UndefinedParameterType } from '@cucumber/messages'; export interface ITestCaseAttempt { attempt: number; willBeRetried: boolean; gherkinDocument: GherkinDocument; pickle: Pickle; stepAttachments: Record; stepResults: Record; testCase: TestCase; worstTestStepResult: TestStepResult; } export default class EventDataCollector { private gherkinDocumentMap; private pickleMap; private testCaseMap; private testCaseAttemptDataMap; readonly undefinedParameterTypes: UndefinedParameterType[]; constructor(eventBroadcaster: EventEmitter); getGherkinDocument(uri: string): GherkinDocument; getPickle(pickleId: string): Pickle; getTestCaseAttempts(): ITestCaseAttempt[]; getTestCaseAttempt(testCaseStartedId: string): ITestCaseAttempt; parseEnvelope(envelope: Envelope): void; private initTestCaseAttempt; storeAttachment(attachment: Attachment): void; storeTestStepResult({ testCaseStartedId, testStepId, testStepResult }: TestStepFinished): void; storeTestCaseResult({ testCaseStartedId, willBeRetried }: TestCaseFinished): void; }