Replies: 2 comments
|
Not sure when these docs were added, but they talk about this here: https://github.com/InsertKoinIO/koin/discussions?discussions_q=is%3Aopen+ Personally, I also use a similar approach to just explicitly overriding services via the MyIsolatedKoinContext.koin instance. |
0 replies
|
If you don't declare your module in your context like this, Then somewhere else : Then when you test : It will work either you inject with constructor or implement with your KoinComponent. PS: Works also with scope ;) Best regards. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
when using Koin Isolated Context like the Koin documentation suggests:
How would you overwrite the koinApp in your unit tests to switch declarations? I am currently running into the problem that I am not able to use different implementations in my unit tests because I can only fill the default Koin context from my understanding and have no option to switch out this isolated context.
Do you have any suggestions?
Edit: I am using field injection via overwritten
getKoin()from theKoinComponentfunction that uses my isolated contextAll reactions