SpeziTestScope
Creates a new instance of TestScope with the provided CoroutineContext.
This function is useful for creating a TestScope with a specific CoroutineContext, defaulting to UnconfinedTestDispatcher if no context is provided.
Return
A new instance of TestScope with the specified CoroutineContext.
Example usage:
val testScope = SpeziTestScope()
testScope.launch {
// Coroutine code to test
}
Content copied to clipboard
Parameters
context
The CoroutineContext to be used for the TestScope. Defaults to UnconfinedTestDispatcher.