function assertEventsCaptured
assertEventsCaptured<TCapture extends TrellisTestAssertionEventCapture>(
capture: TCapture,
expectations: readonly TrellisTestEventExpectationForCapture<TCapture>[],
): Promise<TrellisTestEventCaptureEvent<TCapture>[]>

Waits for several captured-event expectations.

Expectations are matched unordered by default. Pass { ordered: true } to require capture order. Returned events are always in expectation order.

Type Parameters

Parameters

capture: TCapture
expectations: readonly TrellisTestEventExpectationForCapture<TCapture>[]

Return Type

Promise<TrellisTestEventCaptureEvent<TCapture>[]>

Usage

import { assertEventsCaptured } from "trellis-test/index.ts";