Provide a way to load modules immediatly for Android instrumented tests #1318
Labels
android
documentation
status:checking
currently in analysis - discussion or need more detailed specs
Milestone
Is your feature request related to a problem? Please describe.
As the documentation states, on Android, Koin is started by the
Application
class which means that loaded modules are the same for every instrumentation tests.The documentation states that "
loadModules
andunloadModules
are often unsafe because the changes are not applied immediately" which means that modules can't reliebly be swapped — for instance by a mock — for the course of one or a series of specific tests.It is not clear here if
createEagerInstances()
andsingle
screatedAtStart
parameter provide a partial solution to that problem by always immediatly creating singleton modules.Describe the solution you'd like
loadModules
andunloadModules
could provide aexecuteImmediatly
for swapping modules with immediate exectution.Target Koin project
Koin
The text was updated successfully, but these errors were encountered: