https://kotlinlang.org logo
#kotest
Title
# kotest
a

amazingustav

03/22/2024, 3:44 PM
Hey, I'm getting that famous
KoinApplication has not been started
when I try to use
context
in a FunSpec test. This works:
Copy code
test("bar") {
   withApp {
      // code here
   }
}
This doesn't:
Copy code
context("foo") {
   test("bar") {
      withApp {
         // code here
      }
   }
}
fyi the
withApp
is a wrapper we have to avoid Ktor and Koin conflicting in test environment (open to suggestions as well, certainly there's a more appropriated fix)
e

Emil Kantis

03/22/2024, 5:27 PM
Are you using the KoinExtension?
a

amazingustav

03/22/2024, 5:38 PM
Yes