ava/entrypoints/internal.d.mts
Max Isom adbfcde981
Experimentally expose internal events for custom reporters
Add a new `observeRunsFromConfig` experiment, which allows a test run to be observed by a function installed through an `ava.config.*` file.

The function has access to AVA's internal events, which can then be used to report to a file.

AVA's internal event structure is not currently covered by any SemVer guarantees, which is why this feature requires the experimental opt-in.

Does not currently support watch mode. Only the first run is observed.
2023-11-26 21:26:34 +01:00

7 lines
180 B
TypeScript

import type {StateChangeEvent} from '../types/state-change-events.d';
export type Event = StateChangeEvent;
export type ObservedRun = {
events: AsyncIterableIterator<Event>;
};