import type { Clock } from '../services/ports/clock.js'; import type { EventBacklog } from '../services/ports/eventBacklog.js'; type EventStatus = 'pending' | 'processing' | 'failed'; /** * TEST-ONLY. An `EventBacklog` over a list of events a test fills: it counts the * same events as the real one (`pending`, and `processing` for less than the time * core allows), by the clock it is given. `setDepth` is the short way to say * "this many are waiting". `beforeLook` runs before each look, so that a test * can drain the queue while the worker waits. */ export declare class FakeEventBacklog implements EventBacklog { private readonly clock; /** How many times the queue was looked at. */ looks: number; /** Runs before each look, with the number of the look (1 for the first). */ beforeLook: ((look: number) => void) | null; private events; private failures; constructor(clock: Pick); /** An event; a `processing` one began `startedAgoMs` ago. */ add(status: EventStatus, startedAgoMs?: number): this; /** Exactly this many events are waiting, and nothing else is in the queue. */ setDepth(depth: number): this; /** The next `n` looks throw, as a database that hiccups. */ failNextLooks(n: number): this; depth(): Promise; } export {};