scope

val scope: TestProvidedCoroutineScope

A lazy TestProvidedCoroutineScope instance which is reset via cleanUpTestCoroutines after each test.

Before Each:

  • If accessed, Dispatchers.Main is set to the TestCoroutineDispatcher used by the CoroutineContext.

After Each:

  • cleanUpTestCoroutines is called.

  • Dispatchers.Main is reset via Dispatchers.resetMain.

  • The existing scope instance is destroyed.

Sources

Link copied to clipboard