Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1a9f3a0 authored by David Saff's avatar David Saff Committed by Android (Google) Code Review
Browse files

Merge "Clearer (IMHO) wording for Kosmos.runTest" into main

parents fedf8069 38a8717a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@ var Kosmos.brightnessWarningToast: BrightnessWarningToast by
 * Run this test body with a [Kosmos] as receiver, and using the [testScope] currently installed in
 * that Kosmos instance
 */
fun Kosmos.runTest(testBody: suspend Kosmos.() -> Unit) {
    testScope.runTestWithSnapshots testBody@{ this@runTest.testBody() }
fun Kosmos.runTest(testBody: suspend Kosmos.() -> Unit) = let { kosmos ->
    testScope.runTestWithSnapshots { kosmos.testBody() }
}

fun Kosmos.runCurrent() = testScope.runCurrent()