mainDispatcher

fun TestConfig.mainDispatcher(dispatcher: CoroutineDispatcher? = null): TestConfig(source)

Returns a test configuration which specifies a main dispatcher (Dispatchers.setMain) for a TestElement hierarchy.

If dispatcher is null, a single-threaded dispatcher is used.

Note: Only one main dispatcher may exist at any point in time. Therefore, – this configuration may not be overridden at lower levels of the TestElement hierarchy, and