Kotlin Testing Coroutines with kotlin-test
I have something of the following where I'm trying to test a class launches a coroutine and that coroutine does something properly in the thread. However I think don't have the right understanding on how context/dispatchers and scope work so this isn't working as expected.
class Janitor (
private val sharedMap: MutableMap,
private val delayMs: Long,
private val dispatcher: CoroutineDispatcher = newSingleThreadContext("JanitorThread"),
) {
private val janitorScope =...