Test Coroutine Scope
This function was introduced in order to help migrate from TestCoroutineScope to TestScope. Please use TestScope() construction instead, or just runTest(), without creating a scope.
A coroutine scope for launching test coroutines.
It ensures that all the test module machinery is properly initialized.
A CoroutineExceptionHandler is created that makes TestCoroutineScope.cleanupTestCoroutines throw if there were any uncaught exceptions, or forwards the exceptions further in a platform-specific manner if the cleanup was already performed when an exception happened. Passing a CoroutineExceptionHandler is illegal, unless it's an UncaughtExceptionCaptor, in which case the behavior is preserved for the time being for backward compatibility. If you need to have a specific CoroutineExceptionHandler, please pass it to launch on an already-created TestCoroutineScope and share your use case at our issue tracker.