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
arnaud.giuliani
01/18/2021, 9:03 AM
you can use
androidContext(...)
inside your checkModules() lambda
arnaud.giuliani
01/18/2021, 9:03 AM
just before
modules()
k
Kshitij Patil
01/18/2021, 9:11 AM
And what to pass to
androidContext(...)
?
a
arnaud.giuliani
01/18/2021, 9:30 AM
an Android context or a mock one, like for the Android app
k
Kshitij Patil
01/18/2021, 9:44 AM
It'll be instrumentation test if we want to pass android context right ?