Skip to content

Commit

Permalink
In tests, don't attempt to close the ComposeScene if it failed to c…
Browse files Browse the repository at this point in the history
…reate (#1343)
  • Loading branch information
m-sasha committed May 6, 2024
1 parent 32c8757 commit b613230
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ class SkikoComposeUiTest @InternalTestApi constructor(
}

private fun <R> withScene(block: () -> R): R {
scene = runOnUiThread(::createUi)
try {
scene = runOnUiThread(::createUi)
return block()
} finally {
// Close the scene before calling testScope.runTest so that all the coroutines are
Expand Down

0 comments on commit b613230

Please sign in to comment.