You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently testProvided's lambda receives a TestCoroutineScope. This gives the extra functionality from TestCoroutineDispatcher. TestProvidedCoroutineScope implements TestCoroutineScope.
TestProvidedCoroutineScope doesn't offer any new functionality by way of properties or functions, and the benefits from DispatcherProvider don't require that it's declared as any specific type. So there are two benefits of receiving a TestProvidedCoroutineScope over an ordinary TestCoroutineScope:
The Dispatch version implements all specific CoroutineScope types, so it can be used as an argument regardless of the parameter type.
Any future addition to the scope's API would then require this change, so doing it now is future-proofing.
The text was updated successfully, but these errors were encountered:
Currently
testProvided
's lambda receives aTestCoroutineScope
. This gives the extra functionality fromTestCoroutineDispatcher
.TestProvidedCoroutineScope
implementsTestCoroutineScope
.TestProvidedCoroutineScope
doesn't offer any new functionality by way of properties or functions, and the benefits fromDispatcherProvider
don't require that it's declared as any specific type. So there are two benefits of receiving aTestProvidedCoroutineScope
over an ordinaryTestCoroutineScope
:CoroutineScope
types, so it can be used as an argument regardless of the parameter type.The text was updated successfully, but these errors were encountered: