Last active
June 20, 2022 14:49
-
-
Save micHar/eeec3f6ea47825807fbfe33885e720fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MediaPlayer(...) { | |
... | |
fun dispose() { | |
scope.cancel() | |
} | |
} | |
class NeverEndingCoroutineTest { | |
@Test | |
fun `should emit error when playSound throws`() = runTest { | |
... | |
sut.playerErrors.test { | |
sut.play() | |
awaitItem() shouldBe exception | |
} | |
sut.dispose() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment