Classes

c
TrellisTestRuntime(args: { trellisUrl: string; workdir: string; deployment: string; keepWorkdir: boolean; timeouts: RuntimeTimeouts; nats: NatsTestContainer; controlPlane: TrellisProcessHandle; admin: TrellisTestAdminAutomation; })

Runs an isolated Trellis control plane and NATS server for integration tests.

Functions

f
sqliteMemoryUrl(): string

Returns the SQLite in-memory URL used by service-owned tests.

f
tempSqlitePath(name?: string): Promise<string>

Returns a fresh path suitable for a service-owned SQLite database.

f
waitFor<T>(
fn: () =>
T
| null
| undefined
| false
| Promise<T | null | undefined | false>,
opts?: WaitForOptions
): Promise<T>

Polls until fn returns a truthy value, preserving the last thrown error on timeout.

Type Aliases

T
TrellisTestAssertionCapturedEvent<TEventName extends string = string, TPayload = unknown> = { readonly event: TEventName; readonly payload: TPayload; readonly context: unknown; readonly receivedAt: unknown; }

Minimal captured-event shape accepted by the generic event assertion helpers.

T
TrellisTestAssertionEventCapture<
TEvent extends TrellisTestAssertionCapturedEvent = TrellisTestAssertionCapturedEvent
>
= { all(): ReadonlyArray<TEvent>; }

Structural event capture accepted by Trellis test event assertion helpers.

T
TrellisTestAssertNoEventDuringOptions = { readonly durationMs: number; readonly intervalMs?: number; }

Options for assertNoEventDuring.

T
TrellisTestAuthorityPlanClassification = "update" | "migration"

Authority plan classifications the test runtime may approve automatically.

T
TrellisTestCapturedEventContext = { readonly id: string; readonly time: Date; readonly mode: "ephemeral"; }

Transport-neutral listener metadata captured with a test event.

T
TrellisTestCapturedEventContextExpectation = { readonly id?: string; readonly time?: Date; readonly mode?: "ephemeral"; readonly receivedAt?: Date; }

Expected captured event context fields for assertCapturedEventContext.

T
TrellisTestClientKey = { seed: string; sessionKey: string; }

Session-key material returned for a registered app/client participant.

T
TrellisTestEventSourceContract = EventSourceContract

Contract value accepted by TrellisTestRuntime.captureEvents.

T
TrellisTestJobTerminal<TResult = unknown> = { readonly id?: string; readonly state: string; readonly result?: TResult; }

Minimal terminal job snapshot accepted by assertJobCompleted.

T
TrellisTestOrThrowWaitResult<TTerminal> = { orThrow(): MaybePromise<TTerminal>; }

Generated-style wait result exposing an orThrow() terminal unwrap.

T
TrellisTestWaitableJob<TPayload = unknown, TResult = unknown> = { readonly id?: string; wait(): TrellisTestTerminalWaitResult<TrellisTestJobTerminal<TResult>>; }

Structural Trellis job reference accepted by assertJobCompleted.

T
TrellisTestWaitForSource =
TrellisTestWaitForFunction
| { readonly waitFor: TrellisTestWaitForFunction; }

Runtime-like object accepted by eventual Trellis test assertion helpers.