TestCoroutineExceptionHandler

An exception handler that captures uncaught exceptions in tests.

Constructors

TestCoroutineExceptionHandler
Link copied to clipboard
fun TestCoroutineExceptionHandler()

Functions

cleanupTestCoroutines
Link copied to clipboard
open override fun cleanupTestCoroutines()

Call after the test completes to ensure that there were no uncaught exceptions.

handleException
Link copied to clipboard
open override fun handleException(context: CoroutineContext, exception: Throwable)

Properties

uncaughtExceptions
Link copied to clipboard
open override val uncaughtExceptions: List<Throwable>

List of uncaught coroutine exceptions.