Hi, I have seen a couple of issues around the test...
# kotest
j
Hi, I have seen a couple of issues around the test dispatcher but I can’t quite tell if this is the same error. I am using
Copy code
StandardTestDispatcher(testCoroutineScheduler))
to inject a dispatcher into a subject under test. This works fine on android/java but when i run it on iosArmSimulator64 I get the error
Dispatcher is not a TestDispatcher
. I am using the
BehaviorSpec
. Is test scheduler available on ios ? Is there some set up I am missing?
I think the problem is the KotestConfig is not being found / read where we have
coroutineTestScope = true
. I put that config on each test scope and it worked.
s
So you have that set in a project config?
j
yes
i’m working on reproducing in a vanilla app
We have
Copy code
public class KotestConfig : AbstractProjectConfig() {
    override val isolationMode: IsolationMode = IsolationMode.InstancePerRoot
    override val coroutineTestScope: Boolean = true
    override val invocationTimeout: Duration = 30.seconds
    override val timeout: Duration = 30.seconds
    override val projectTimeout: Duration = 5.minutes
}
but its in a module that we depend on in commonTest
Copy code
commonTest.dependencies {
            implementation(projects.coreTestConfigAndFakes)
            implementation(catalog.kotlin.coroutinesTest)
        }
s
The scanner probably won't find it unless it's alongside the tests
j
ah bummer
s
I'd have to check how ksp finds the classes
j
Should I raise it as a bug or do you want to get back to me first?
its fine if you close it as won’t fix just want to track it
s
If you can make an issue to track that would be great
j
kk will do
thanks!
s
Ty
👍 1