API reference / @node-ts/bus-test / messageRoundTripTests
Function: messageRoundTripTests()
ts
function messageRoundTripTests(transport): void;Defined in: bus-test/src/message-round-trip-tests.ts:17
A suite that sends messages with nested types (Dates, class instances several levels deep, arrays, Maps, Sets, optional and null fields) through a transport and checks they arrive at the handler with their types restored and their attributes intact. transportTests already runs these cases, so use this on its own only when the full suite doesn't apply.
Parameters
| Parameter | Type | Description |
|---|---|---|
transport | Transport | A fully configured transport that's the subject under test. It must (de)serialize messages through coreDependencies.messageSerializer. |
Returns
void