Releases: lupuuss/Mokkery
Releases · lupuuss/Mokkery
2.0.0-RC1
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
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
andignoreFinalMembers
. - 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
andArgMatcher
implementations are no longerdata
classes.copy
andcomponentN
functions are no longer available.equals
,hashCode
andtoString
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
This version is based on Mokkery 1.6.1 and contains value class
fix #2.
1.6.1
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 anyvalue class
. For Wasm only value classes from standard library are handled. Other value classes have to configured withAutofillProvider
2.0.0-Beta2
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
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
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
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
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
to1.8.0
- Bumps
atomic-fu
to0.23.1
Bug fixes
- Moves
mokkery-core
fromimplementation
toapi
for Mokkery Gradle plugin to fix issues with usingmokkery
Gradle extension
1.3.2
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.