Skip to content

Graphorin API reference v0.8.0


Graphorin API reference / @graphorin/channels / testkit / ConformanceHarness

Interface: ConformanceHarness

Defined in: packages/channels/src/testkit/conformance.ts:50

Hooks the suite uses to drive the adapter under test. sendInbound must make the adapter produce ONE inbound message (for a real vendor adapter: through the vendor fake; the loopback adapter's inject satisfies it directly).

Stable

Methods

failNextDeliver()?

ts
optional failNextDeliver(adapter): void;

Defined in: packages/channels/src/testkit/conformance.ts:64

Optional: make the NEXT deliver on adapter fail, so the typed-error contract can be exercised. Omit if the adapter cannot simulate failures; the corresponding test is skipped.

Parameters

ParameterType
adapterChannelAdapter

Returns

void


makeAdapter()

ts
makeAdapter(): ChannelAdapter;

Defined in: packages/channels/src/testkit/conformance.ts:52

Fresh adapter instance per test.

Returns

ChannelAdapter


sendInbound()

ts
sendInbound(adapter, text): Promise<InboundAcceptance>;

Defined in: packages/channels/src/testkit/conformance.ts:58

Cause adapter (already started) to emit one inbound message with the given text; resolves with the acceptance the adapter observed.

Parameters

ParameterType
adapterChannelAdapter
textstring

Returns

Promise&lt;InboundAcceptance&gt;