Graphorin API reference v0.8.0
Graphorin API reference / @graphorin/channels / testkit
testkit
@graphorin/channels/testkit - conformance suite + in-memory building blocks for adapter authors and application tests.
Interfaces
| Interface | Description |
|---|---|
| ConformanceHarness | 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). |
| ConformanceTestApi | The subset of the vitest/jest API the conformance suite needs - injected so this module has no test-framework dependency. |
| LoopbackAdapter | The in-memory loopback adapter: a full ChannelAdapter whose transport is the test itself. Tests inject() inbound messages and read deliveries for what the gateway sent back. |
| LoopbackAdapterOptions | Options for createLoopbackAdapter. |
| LoopbackInboundInput | Convenience shape for LoopbackAdapter.inject. |
Functions
| Function | Description |
|---|---|
| createInMemoryPairingStore | In-memory PairingStore for tests and single-process prototypes. Mirrors the sqlite implementation's semantics (one pending request per peer, per-channel code uniqueness by construction). |
| createLoopbackAdapter | Build a loopback adapter for tests and prototypes. |
| describeChannelAdapterConformance | Register the conformance suite against a harness. |