Skip to content

transportConformance

function transportConformance<E, R>(
plugin: Omit<
Definition<void, any, any>,
"~@graftland/graft/Plugin/Contract"
> & {
"~@graftland/graft/Plugin/Contract": unknown
},
connect: Effect<Connection, E, R>,
expected: {
close?: Effect<void, never, never>
closeTimeout?: Input
name: string
protocols: readonly string[]
version: string
},
): Effect<void, SchemaError | ManagedFork | CleanupError | E, Scope | Graft | R>

Defined in: Testing.ts:136

Shared transport contract. The caller owns Graft and supplies a fresh connection.

Type Parameter
E
R
Parameter Type Description
plugin Omit<Definition<void, any, any>, "~@graftland/graft/Plugin/Contract"> & { "~@graftland/graft/Plugin/Contract": unknown; } -
connect Effect<Connection, E, R> -
expected { close?: Effect<void, never, never>; closeTimeout?: Input; name: string; protocols: readonly string[]; version: string; } -
expected.close? Effect<void, never, never> -
expected.closeTimeout? Input Maximum time for close and disconnection; defaults to five seconds.
expected.name string -
expected.protocols readonly string[] -
expected.version string -

Effect<void, SchemaError | ManagedFork | CleanupError | E, Scope | Graft | R>