I'm looking at code that's a bit bloated with unne...
# mockk
k
I'm looking at code that's a bit bloated with unnecessary
every { ... } returns ...
, or
justRun {...}
calls. Is there a way to turn on some diagnostic that tells you about any calls to
every
or
justRun
that weren't followed by an actual call to the given mock method?
j
checkUnnecessaryStub
m
or maybe declare the mocks with
relaxed = true
and remove all the unnecessary stubbings