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

# Function: workflowStateRoundTripTests()

```ts
function workflowStateRoundTripTests(persistence): void;
```

Defined in: [bus-test/src/workflow-state-round-trip-tests.ts:32](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/workflow-state-round-trip-tests.ts#L32)

A suite that starts a class workflow and a workflow declared with `defineWorkflow`, each with state that has
nested types (Dates, class instances several levels deep and arrays of Dates), then checks the state the next
handler of each reads back from the persistence has its types restored.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `persistence` | [`Persistence`](../../bus-core/interfaces/Persistence.md) | A fully configured persistence that's the subject under test. It's disposed when the suite's bus is disposed, unless another bus that uses it is still running. |

## Returns

`void`
