Just import scala.concurrent.ExecutionContext.Implicits.global
and this will load the default ExecutionContext
for Future
objects in your tests to work properly.
NOTE: to use Futures in tests, everything is in order. For real projects, it is recommended that you use the ExecutionContext
each case.
source share