UNPKG

e2ed

Version:

E2E testing framework over Playwright

41 lines (40 loc) 1.21 kB
import type { LogEventType, TestRunStatus } from '../constants/internal'; import type { UtcTimeInMs } from './date'; import type { LogPayload } from './log'; import type { RunLabel } from './runLabel'; import type { RejectTestRun, RunId, TestFn, TestStaticOptions } from './testRun'; import type { TestMetaPlaceholder } from './userland'; /** * Log event (on log call). */ export type LogEvent = Readonly<{ message: string; payload: LogPayload | undefined; time: UtcTimeInMs; type: LogEventType; }>; /** * Log event with children (for groupping of `TestRun` steps). */ export type LogEventWithChildren = LogEvent & Readonly<{ children: readonly LogEventWithChildren[]; }>; /** * Onlog test run callback. */ export type Onlog = () => void; /** * TestRun event (on starting one test) with userland metadata. */ export type TestRunEvent<TestMeta = TestMetaPlaceholder> = Readonly<{ logEvents: readonly LogEvent[]; onlog: Onlog; outputDirectoryName: string; reject: RejectTestRun; retryIndex: number; runId: RunId; runLabel: RunLabel; status: TestRunStatus; testFnWithReject: TestFn; utcTimeInMs: UtcTimeInMs; }> & TestStaticOptions<TestMeta>;