-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Description
When trying to unit test a Workflow that inherits from SessionWorkflow using RenderTester#testRender I get this error:
SessionWorkflow should never call initialState without the CoroutineScope.
java.lang.IllegalStateException: SessionWorkflow should never call initialState without the CoroutineScope.
at com.squareup.workflow1.SessionWorkflow.initialState(SessionWorkflow.kt:82)
at com.squareup.workflow1.testing.RenderTesterKt.testRender(RenderTester.kt:29)
It looks like RenderTester#testRender is calling an overloaded initialState method that SessionWorkflow doesn't support, see
workflow-kotlin/workflow-core/src/commonMain/kotlin/com/squareup/workflow1/SessionWorkflow.kt
Lines 78 to 84 in b7e37bc
| public final override fun initialState( | |
| props: PropsT, | |
| snapshot: Snapshot? | |
| ): StateT { | |
| error("SessionWorkflow should never call initialState without the CoroutineScope.") | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels