Skip to content

Releases: lupuuss/Mokkery

1.3.2

18 Jan 00:32

Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.22-1.3.2 1.9.22
1.9.21-1.3.2 1.9.21
1.9.20-1.3.2 1.9.20

Changelog:

Breaking changes

  • Calling super methods from indirect supertypes is not allowed by default. This must be explicitly enabled in your Gradle files:
mokkery {
   allowIndirectSuperCalls.set(true)
}

Bug fixes

  • Now mocking types with Java defaults in indirect super types does not result in runtime error.

1.3.1

03 Jan 22:01

Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.22-1.3.1 1.9.22
1.9.21-1.3.1 1.9.21
1.9.20-1.3.1 1.9.20

Changelog:

New features

  • Improved error messages for IR.
  • Added experimental FIR error checkers enabled with kotlin.experimental.tryK2=true.

Bug fixes

  • JsMokkeryScopeLookup no longer keeps strong reference to anonymous function mocks (JS platform).
  • Mokkery plugin no longer tries to mock abstract classes with final properties (resulted in runtime errors)

1.3.0

13 Aug 15:00

Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.20-1.3.0 1.9.20
1.9.10-1.3.0 1.9.10
1.9.0-1.3.0 1.9.0
1.8.22-1.3.0 1.8.22
1.8.21-1.3.0 1.8.21
1.8.20-1.3.0 1.8.20

Changelog:

Breaking changes

  • Every ArgMatcher.Composite has to implement Capture and propagate possible capture to child matchers.
  • calls block signature has changed:
    • Only arguments are available by it parameter (destructuring declaration is still possible in the same way as before).
    • Other operations are now available under this.
  • Capture.values is extracted to separate interface ContainerCapture.

New features

  • Now it is possible to call super methods with special calls overload (for convenience) or from calls block (for flexibility).
  • Adds support for vararg matchers (especially wildcards) to be used with composite matchers and captures.

Dependencies

  • Bumps kotlin coroutines to 1.7.3

Bug fixes

  • self in calls block for functional type mocks on JS returns correct object now.
  • Compiler plugin no longer fails with kotlin.experimental.tryK2=true

1.2.0

29 Jul 19:56

Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.0-1.2.0 1.9.0
1.8.22-1.2.0 1.8.22
1.8.21-1.2.0 1.8.21
1.8.20-1.2.0 1.8.20

Changelog:

New features

  • Support for mocking functional types for JS. Now mocking capabilities should be consistent for all targets.
  • Arguments capturing with capture matcher (currently it does not work for composite matchers and varargs)
  • Debug functions that allows mock state inspection - mokkeryDebugString and printMokkeryDebug

Improvements

  • Mocks identifiers should be now more readable.

Bug fixes

  • Sometimes incremental compilation was resulting in compiler plugin crash (especially for JS)

1.1.0

17 Jul 19:59

Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.0-1.1.0 1.9.0
1.8.22-1.1.0 1.8.22
1.8.21-1.1.0 1.8.21
1.8.20-1.1.0 1.8.20

Changelog:

Breaking changes

  • Replaced varargs matcher with varargsAll and varargsAny.
  • Removed type parameter from VarArgMatcher and it is selead now. Use VarArgMatcher.Base for custom implementations.

New features

  • New regular matchers: ofType, isIn, isNotIn, contentEq, contentDeepEq.
  • New answer types: sequentially, sequentiallyReturns, sequentiallyThrows
  • Support for composed matchers
  • Logical matchers (as an example of composed matchers) and, or and not.
  • Added self to FunctionScope

Bug fixes

  • Nested mock call in mock block was not replaced by the compiler plugin
  • notEqRef was acting like eqRef
  • Generic method with primitive type argument was causing crashes on K/N

1.0.1

12 Jul 21:40

Choose a tag to compare

Release the kraken! 🦑

Available plugins:

Plugin version Kotlin version
1.8.20-1.01 1.8.20
1.8.21-1.01 1.8.21
1.8.22-1.01 1.8.22
1.9.0-1.01 1.9.0