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

Commit 38a8717a authored by David Saff's avatar David Saff
Browse files

Clearer (IMHO) wording for Kosmos.runTest

Bug: N/A
Change-Id: Ia9b0966656fb8e84cf8f427f9bc7703d179126c5
Test: presubmit
Flag: TEST_ONLY
parent c6f71651
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()