Skip to content

Commit b1cbe16

Browse files
committed
Clean up RenderWorkflowInTest
1 parent 268daed commit b1cbe16

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

workflow-runtime/src/commonTest/kotlin/com/squareup/workflow1/RenderWorkflowInTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class RenderWorkflowInTest {
5151
val workflow = Workflow.stateless<String, Nothing, String> { "props: $it" }
5252
// Don't allow the workflow runtime to actually start.
5353

54-
val renderings = renderWorkflowIn(workflow, TestScope(), props) {}
54+
val renderings = renderWorkflowIn(workflow, pausedTestScope, props) {}
5555
assertEquals("props: foo", renderings.value.rendering)
5656
}
5757

@@ -180,7 +180,6 @@ class RenderWorkflowInTest {
180180
}
181181
sink.send("unchanging state")
182182
sink.send("unchanging state")
183-
pausedTestScope.advanceUntilIdle()
184183
scope.cancel()
185184

186185
assertFalse(snapped)

workflow-runtime/src/commonTest/kotlin/com/squareup/workflow1/internal/WorkflowRunnerTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ internal class WorkflowRunnerTest {
220220
assertEquals("foo", cancellationException!!.message)
221221
}
222222

223-
224223
private fun <T> WorkflowRunner<*, T, *>.runTillNextOutput(): WorkflowOutput<T>? = scope.run {
225224
val firstOutputDeferred = async { nextOutput() }
226225
runCurrent()

0 commit comments

Comments
 (0)