Closed bigman212 closed 1 year ago
Hello, I've just proposed a new JVM API to let you verify your app configuration: Module.verify()
this will analyze your class constructors against your Koin configuration. No need of mocking, just call verify()
on your module.
For any "extra types" (such as Context, SavedStateHandle, WorkParamaters), you can declare them with extraTypes
parameter.
Describe the bug When defining worker { } block in module and try to unit test the dependency graph - the unit tests fails.
To Reproduce Steps to reproduce the behavior:
// App.kt - onCreate startKoin { androidContext(this@App) workManagerFactory() modules(AppModule.module) }
I couldn't find a way to mock ConnectivityManager properly.
Expected behavior Unit test passes, worker is created.
Koin project used and used version (please complete the following information):
Additional moduleDefinition No info.