using the `verify` testing API, I notice that it’s...
# koin
s
using the
verify
testing API, I notice that it’s naturally complaining about some things not being in the graph which we provide to some ViewModels and so on by passing them using the
parametersOf()
on the call site. Does this mean that for all of those I simply have to pass them into the list that
verify()
accepts to simply ignore these warnings? We have a bunch of those, and also for some of them they’re internal in sub-modules, so having the entire list of those in my :app where I run this test is kinda inconvenient.
As I am adding those types into that list, I also see that it’s complaining about types like
Context
missing, which is not provided by my code exactly, but from doing
androidContext(context.applicationContext)
. Or
WorkerParameters
which is provided from
workManagerFactory()
I guess again, I need to pass
Context::class
and
WorkerParameters::class
in there for the verify task to ignore this too right?
a
yes, `verify()`help to check constructors not dynamic expressions with parameters
the new `koin-android-test`project brings Android type out of the box
s
Right, which means that in all the places where I do pass something as a parameter, I need to manually go find each of these ones, and add them to the ignored classes from this verify task. And if those classes are part of submodules and I don’t “see” them from the :app module, then I need to come up with something to make this happen. Not really convenient but alright
a
I'm working on something between checkModules and verify to help more 👍
checkModules cover completely, but need mock. Verify() check constructors but not kotlin expression
s
Sounds great, looking forward to that!
a
👍