Daniel Weidensdörfer
10/16/2024, 1:38 PMrunComposeUiTest
:
[error] JsException: Exception was thrown while running JavaScript code
IllegalStateException: CompositionLocal LocalLifecycleOwner not present
Any ideas where this is coming from and how to resolive this? I'm using
org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose
org.jetbrains.androidx.navigation:navigation-compose
that might be potential causes.Konstantin Tskhovrebov
10/16/2024, 4:30 PMCompositionLocalProvider(LocalLifecycleOwner provides TestLifecycleOwner(Lifecycle.State.RESUMED)) {
content()
}
but a multiplatform TestLifecycleOwner is not published yet so you are supposed to copy it:
https://github.com/JetBrains/compose-multiplatform-core/blob/1342b4daf25558fdd61be[…]monMain/kotlin/androidx/lifecycle/testing/TestLifecycleOwner.ktDaniel Weidensdörfer
10/17/2024, 1:26 PM