WorkflowTestParams

@TestOnly
class WorkflowTestParams<out StateT>(val startFrom: WorkflowTestParams.StartMode<StateT> = StartFresh, val checkRenderIdempotence: Boolean = true)(source)

Defines configuration for workflow testing infrastructure such as testRender, testFromStart. and test.

Parameters

startFrom

How to start the workflow – see StartMode.

checkRenderIdempotence

If true, every render method will be called multiple times, to help suss out any side effects that a render method is trying to perform. This parameter defaults to true since the workflow contract is that render will be called an arbitrary number of times for any given state, so performing side effects in render will almost always result in bugs. It is recommended to leave this on, but if you need to debug a test and don't want to have to deal with the extra passes, you can temporarily set it to false.

Constructors

Link copied to clipboard
constructor(startFrom: WorkflowTestParams.StartMode<StateT> = StartFresh, checkRenderIdempotence: Boolean = true)

Types

Link copied to clipboard
sealed class StartMode<out StateT>

Defines how to start the workflow for tests.

Properties

Link copied to clipboard
Link copied to clipboard