TransportContractWorld
Defined in: console-sdk/src/testing/describeTransportContract.ts:32
What one contract-suite test needs from the transport under test. The simulated world provides everything cheaply; a hardware lane provides the same shape with real waiting and a real console, and may omit the optional capabilities (their assertions are skipped).
Methods
Section titled “Methods”discoverableDevice()
Section titled “discoverableDevice()”Defined in: console-sdk/src/testing/describeTransportContract.ts:36
A device that scans and connects; resolves its transport id.
Returns
Section titled “Returns”dropLink()?
Section titled “dropLink()?”
optionaldropLink(deviceId):void
Defined in: console-sdk/src/testing/describeTransportContract.ts:44
Optional: force an unexpected link drop.
Parameters
Section titled “Parameters”deviceId
Section titled “deviceId”Returns
Section titled “Returns”void
emitFrame()?
Section titled “emitFrame()?”
optionalemitFrame(deviceId):void
Defined in: console-sdk/src/testing/describeTransportContract.ts:42
Optional: make the device emit one inbound frame.
Parameters
Section titled “Parameters”deviceId
Section titled “deviceId”Returns
Section titled “Returns”void
unreachableDevice()
Section titled “unreachableDevice()”Defined in: console-sdk/src/testing/describeTransportContract.ts:38
A device id that can never connect (drives the timeout contract).
Returns
Section titled “Returns”wait()
Section titled “wait()”wait(
ms):Promise<void>
Defined in: console-sdk/src/testing/describeTransportContract.ts:40
Advance time by ms — simulated clock in CI, real waiting on hardware.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<void>
Properties
Section titled “Properties”transport
Section titled “transport”
readonlytransport:ConsoleTransport
Defined in: console-sdk/src/testing/describeTransportContract.ts:34
The factory under test — the suite invokes it with its own delegate.