Mockk is a mocking library for 🧑‍💻️ Kotlin.

Tips and tricks

  • Use relaxUnitFun = true instead of relaxed = true to require all mocks to be defined
  • checkUnnecessaryStub to validate that all stub definitions have been called in the code
    • Annotate with @MockKExtension.CheckUnnecessaryStub (documentation)