Skip to content

Releases: lupuuss/Mokkery

2.9.0

23 Jun 19:20
2fe59c9
Compare
Choose a tag to compare

Changelog:

⚠️ Breaking Changes

  • Bump minimum Kotlin version to 2.2.0.

🐛 Bug fixes

  • #83 Fix compatibility broken by Kotlin 2.2.0

2.8.0

22 May 18:39
ec72235
Compare
Choose a tag to compare

Changelog:

🚀 Features

  • Add super call extensions to MokkeryBlockingCallScope and MokkerySuspendCallScope.
  • Add MokkeryCallScope.self<T>.
  • Add FunctionCall.argValue and FunctionCall.argValues.

⚠️ Breaking Changes

  • Bump minimum Kotlin version to 2.1.20.
  • Move MokkeryCallScope, MokkeryBlockingCallScope, and MokkerySuspendCallScope from the dev.mokkery.interceptor package to dev.mokkery.

♻️ Deprecations

  • Deprecate Answer.call(FunctionScope) and Answer.callSuspend(FunctionScope) in favor of overloads with MokkeryCallScope. A migration guide is available in the Answer interface documentation.
  • Remove indirect super calls.

✨ Improvements

  • #84 Add workaround for Android test fixtures.
  • Change ApplicationRule.AllTests to support test fixtures in the future.
  • Align JS functions toString behavior with other mocks.

🌳 Dependencies

  • Bump kotlinx.coroutines to 1.10.2.
  • Bump Kotlin to 2.1.21.

2.7.2

21 Mar 16:51
4be6915
Compare
Choose a tag to compare

Changelog:

🐛 Bug fixes

  • #77 Fix compatibility broken by Kotlin 2.1.20

2.7.1

10 Mar 21:08
16ce11e
Compare
Choose a tag to compare

Changelog:

🐛 Bug fixes

  • #78 Fix mocking data classes

⚠️ Breaking changes

  • Due to #78 MokkerySuiteScope.mocks returns List<Any> instead of Set<Any>

2.7.0

15 Feb 22:30
72c66f2
Compare
Choose a tag to compare

Changelog:

🚀 Features

  • #52 Add a way to make exhaustiveness checks more strict! Check the guide here.

⚠️ Breaking changes

  • Rename MokkeryCallScope.context to MokkeryCallScope.mokkeryContext and now it's inherited from MokkeryScope

♻️ Deprecations

  • Change deprecation level of allowIndirectSuperCalls from warning to error

🌳 Dependencies

  • Bump atomicfu to 0.27.0
  • Bump kotlinx.coroutines to 1.10.1
  • Bump Kotlin to 2.1.10

2.6.1

15 Dec 13:48
159214e
Compare
Choose a tag to compare

Changelog:

🐛 Bug fixes

  • #66 Fix compilation crash on mocking type with constructor that has generic parameter

2.6.0

28 Nov 19:38
a4d1684
Compare
Choose a tag to compare

Changelog:

⚠️ Breaking changes

  • Now minimum Kotlin version is 2.1.0.

🐛 Bug fixes

  • #48 Fix compatibility broken by Kotlin 2.1.0

🚧 Known issues

  • #63 signal 11: Segmentation fault when using matchers with methods accepting Objective-C types

2.5.1

12 Nov 19:40
2f0c9c2
Compare
Choose a tag to compare

Changelog:

✨ Improvements

  • #19 Preserve generic arguments for a mocked type so that MockMode.autofill and MockMode.autoUnit work better with generics, especially lambdas.
  • The Gradle plugin warns about potential Kotlin version incompatibilities whenever the major or minor version is higher than the version Mokkery was compiled against. Warning can be disabled by Gradle properties flag dev.mokkery.versionWarnings=false

🐛 Bug fixes

  • Fix MockMany identifier to remove unnecessary type parameter information.
  • Fix Intelij internal error when integrating with Mokkery frontend plugin.
    IntelliJ integration with K2 frontend plugins is currently enabled by default only for first-party plugins (e.g., kotlinx.serialization, Compose). Integration with third-party plugins is experimental and requires disabling the kotlin.k2.only.bundled.compiler.plugins.enabled flag in the IDE registry (Shift + Shift and search for Registry) .

2.5.0

04 Nov 19:52
e5d57c5
Compare
Choose a tag to compare

Changelog:

🚀 Features

  • #34 Now it is possible to intercept mock calls with MokkeryCallInterceptor. Currently, it allows intercepting just before returning an answer. Use MokkeryCallInterceptor.beforeAnswering.register to register interceptor.
  • Add predefined interceptors: MokkeryCallListener, MokkeryCallLogger

🐛 Bug fixes

  • Fix compilation crash when using a type with mixed function and type scope parameters
  • #54 Rename mock internal members to avoid clashes with mocked type members
  • [JVM] Fix ClassCastException whenever trying to mock function that returns Array of generic type.
  • Fix properties super calls for indirect super types were not generated.
  • #53 Add null check before accessing getter
  • Make IR generated fields private (causes a warning in Kotlin 2.1.0)
  • Restore mock names to contain fully qualified names

♻️ Deprecations

  • allowIndirectSuperCalls is scheduled for removal

🌳 Dependencies

  • Bump atomicfu to 0.26.0
  • Bump Kotlin to 2.0.21

2.4.0

06 Oct 17:33
Compare
Choose a tag to compare

Changelog:

🚀 Features

  • New ApplicationRule.All that applies Mokkery for all source sets in a project. Applicable when mocks are extracted to separate project.
  • Adds Wasm-WASI support for mokkery-coroutines

🐛 Bug fixes

  • Adds missing watchosArm32 support
  • #43 Fix kotlin.IllegalStateException: KClass for Objective-C classes is not supported yet
  • #44 Fix ClassCastException when mocking a suspending call with default argument on Kotlin Native

🌳 Dependencies

  • Bump atomicfu to 0.25.0
  • Bump kotlinx.coroutines to 1.9.0