SessionWorkflow throws when trying to unit test it with RenderTester#testRender
antoniorosario opened this issue · comments
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