Make testProvided's lambda extend TestProvidedCoroutineScope
RBusarow opened this issue · comments
Rick Busarow commented
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.