function assertOperationCompleted
assertOperationCompleted<TProgress, TOutput>(
opOrTerminal:
): Promise<
TerminalOperation<TProgress, TOutput>
& { state: "completed"; }
>

Asserts that an operation reference or terminal operation completed successfully.

When expectedOutput is provided, object outputs are matched as a recursive subset while arrays and primitives are compared exactly.

Type Parameters

TProgress
TOutput

Parameters

opOrTerminal:
optional
expectedOutput: TrellisTestDeepPartial<TOutput>

Return Type

Promise<
TerminalOperation<TProgress, TOutput>
& { state: "completed"; }
>

Usage

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