Skip to content

Releases: lupuuss/Mokkery

2.0.0-RC1

04 May 18:48
Compare
Choose a tag to compare
2.0.0-RC1 Pre-release
Pre-release

This version is based on Mokkery 1.7.0

Additional changes

  • Bumps Kotlin version to 2.0.0-RC2
  • Removes IR validation as it's fully replaced by FIR validation

1.7.0

04 May 18:48
Compare
Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.24-1.7.0 1.9.24
1.9.23-1.7.0 1.9.23

Changelog:

Features

  • New function mockMany that allows creating mock that implements multiple types (up to 5).
  • New plugin options - ignoreInlineMembers and ignoreFinalMembers.
  • New mock mode original that fallbacks to original implementations of mocked type.

Breaking changes

This change affects public API, but it should not break regular usage.

  • Answer and ArgMatcher implementations are no longer data classes.
    • copy and componentN functions are no longer available.
    • equals, hashCode and toString keep their old logic.

Improvements

  • Shorter names with CallNotMockedException.
  • Documentation improvements

Bug fixes

  • Compilation crash for WASM on mocked type with super call available for method accepting String

2.0.0-Beta3

05 Apr 21:29
Compare
Choose a tag to compare
2.0.0-Beta3 Pre-release
Pre-release

This version is based on Mokkery 1.6.1 and contains value class fix #2.

1.6.1

05 Apr 21:27
Compare
Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.23-1.6.1 1.9.23

Changelog:

Improvements

  • Changes AutofillProvider API to allow providing values not only for autofill mock mode but also for internal machinery. It allows easy workaround in case of a bug similar to #2

Bug fixes

  • #2 Fixes crash (NPE on JVM, illegal-cast on Wasm) on attempt to mock a function that returns or accepts value class. For JVM, fix should work for any value class. For Wasm only value classes from standard library are handled. Other value classes have to configured with AutofillProvider

2.0.0-Beta2

03 Apr 00:12
Compare
Choose a tag to compare
2.0.0-Beta2 Pre-release
Pre-release

This version is based on Mokkery 1.6.0.

Additional changes

  • Bumps Kotlin version to 2.0.0-Beta5
  • Addresses compatibility issue with Kotlin 2.0.0-Beta5 caused by function removal from Kotlin Compiler API.

1.6.0

03 Apr 00:08
Compare
Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.23-1.6.0 1.9.23

Changelog:

Features

  • Adds AutofillProvider API that allows configuring values returned in autofill mode.

Improvements

  • Provides more information in verification output for all modes
  • Shortens mock names in verification output
  • Prints super call answers in shorter form in printMokkeryDebug

Dependencies

  • Bumps atomic-fu to 0.23.2

Bug fixes

  • Function mocking on Wasm is now performed in a static way (as with all non-JS platforms). The dynamic approach from JS required weak reference support (which is missing) and caused a memory leak

1.5.0

11 Mar 21:29
Compare
Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.23-1.5.0 1.9.23
1.9.22-1.5.0 1.9.22

Changelog:

Features

  • Support for Wasm-WASI (without coroutines support)
  • New answers: sequentiallyRepeat , throwsErrorWith.
  • New matchers: notNull, matchingBy.

Improvements

  • Mokkery plugin adds runtime dependencies only to root source sets

2.0.0-Beta1

19 Feb 23:11
Compare
Choose a tag to compare
2.0.0-Beta1 Pre-release
Pre-release

This version is based on Mokkery 1.4.0.

Additional changes

  • Bumps Kotlin version to 2.0.0-Beta4
  • Removes Kotlin version lock and allows usage with future Kotlin 2.0 releases

1.4.0

19 Feb 22:29
Compare
Choose a tag to compare

Available plugins:

Plugin version Kotlin version
1.9.22-1.4.0 1.9.22
1.9.21-1.4.0 1.9.21
1.9.20-1.4.0 1.9.20

Changelog:

Features

  • Support for Wasm-JS

Improvements

  • Mokkery plugin no longer adds -Xno-param-assertions to JVM source sets

Dependencies

  • Bumps kotlinx-coroutines to 1.8.0
  • Bumps atomic-fu to 0.23.1

Bug fixes

  • Moves mokkery-core from implementation to api for Mokkery Gradle plugin to fix issues with using mokkery Gradle extension

1.3.2

18 Jan 00:32
Compare
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.