Justin Tullgren
03/31/2026, 2:48 PMStandardTestDispatcher(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?Justin Tullgren
03/31/2026, 3:20 PMcoroutineTestScope = true. I put that config on each test scope and it worked.sam
03/31/2026, 3:54 PMJustin Tullgren
03/31/2026, 3:54 PMJustin Tullgren
03/31/2026, 3:55 PMJustin Tullgren
03/31/2026, 3:56 PMpublic 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
commonTest.dependencies {
implementation(projects.coreTestConfigAndFakes)
implementation(catalog.kotlin.coroutinesTest)
}sam
03/31/2026, 3:56 PMJustin Tullgren
03/31/2026, 3:57 PMsam
03/31/2026, 3:57 PMsam
03/31/2026, 3:57 PMJustin Tullgren
03/31/2026, 3:58 PMJustin Tullgren
03/31/2026, 3:58 PMsam
03/31/2026, 3:58 PMJustin Tullgren
03/31/2026, 3:58 PMJustin Tullgren
03/31/2026, 3:58 PMJustin Tullgren
03/31/2026, 7:34 PMsam
03/31/2026, 7:35 PM