so i have a fairly simple piece of code. Nothing t...
# kotest
v
so i have a fairly simple piece of code. Nothing to crazy...
Copy code
declareMock<Database>(named(InjectableModules.SONG_DATABASE_NAME)) {
         justRun { update(any(), any()) }
         justRun { add(any()) }

    }
YET IT STILL BREAKS Caused by: java.lang.IllegalStateException: Missing MockProvider. Please use MockProvider.register() to register a new mock provider WHY is it breaking.
s
it looks like koin and mockk’s problem isn’t it? https://github.com/InsertKoinIO/koin/issues/841#issuecomment-653407887
v
yes turns out that when you do the registermock you have to do it FIRST or in a beforeeach..