---
url: https://node-ts.github.io/bus/api/bus-test/functions/transportTests.md
---
[API reference](../../index.md) / [@node-ts/bus-test](../index.md) / transportTests

# Function: transportTests()

```ts
function transportTests(
   transport, 
   publishSystemMessage, 
   systemMessageTopicIdentifier, 
   readAllFromDeadLetterQueue
): void;
```

Defined in: [bus-test/src/transport-tests.ts:36](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/transport-tests.ts#L36)

A suite of tests that get wrapped by the integration test setup/tear-down of an
implementation of a transport. The suite sends messages with nested types (Dates, class
instances, arrays, Maps, Sets, optional and null fields) and checks they arrive with their
types restored, so the transport must (de)serialize messages through
`coreDependencies.messageSerializer`.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `transport` | [`Transport`](../../bus-core/interfaces/Transport.md) | A fully configured transport that's the subject under test |
| `publishSystemMessage` | (`testSystemAttributeValue`) => `Promise`<`void`> | A callback that will publish a `@node-ts/bus-test:TestSystemMessage` with a `systemMessage` attribute set to the value of the `testSystemAttributeValue` parameter |
| `systemMessageTopicIdentifier` | `string` | `undefined` | An optional system message topic identifier that identifies the source topic of the system message |
| `readAllFromDeadLetterQueue` | () => `Promise`<`object`\[]> | A callback that will read and delete all messages on the dead letter queue |

## Returns

`void`
