How to provide android context to `checkModules()`...
# koin
k
How to provide android context to
checkModules()
test ? I'm getting can't provide null context to Database object as my viewmodel depends on repository which depends on room database. I tried to follow androidx-samples example from repo but failed to get it working
a
you can use
androidContext(...)
inside your checkModules() lambda
just before
modules()
k
And what to pass to
androidContext(...)
?
a
an Android context or a mock one, like for the Android app
k
It'll be instrumentation test if we want to pass android context right ?
a
yep