tseisel
02/08/2021, 8:42 AMdelay
and I'd like to check that at least X seconds has elapsed between 2 operations. TestCoroutineDispatcher
from kotlinx-coroutines-test
has this capability but I can't find a way to use it with StringSpec
.sam
02/08/2021, 10:18 AMtseisel
02/08/2021, 1:35 PMsam
02/08/2021, 1:54 PMwithContext
sam
02/08/2021, 1:54 PMtest("my test"){
withContext(TestCoroutineDispatcher) {
...
}
}
sam
02/08/2021, 1:54 PM