Releases: lupuuss/Mokkery
Releases · lupuuss/Mokkery
2.9.0
2.8.0
Changelog:
🚀 Features
- Add super call extensions to
MokkeryBlockingCallScope
andMokkerySuspendCallScope
. - Add
MokkeryCallScope.self<T>
. - Add
FunctionCall.argValue
andFunctionCall.argValues
.
⚠️ Breaking Changes
- Bump minimum Kotlin version to
2.1.20
. - Move
MokkeryCallScope
,MokkeryBlockingCallScope
, andMokkerySuspendCallScope
from thedev.mokkery.interceptor
package todev.mokkery
.
♻️ Deprecations
- Deprecate
Answer.call(FunctionScope)
andAnswer.callSuspend(FunctionScope)
in favor of overloads withMokkeryCallScope
. 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
to1.10.2
. - Bump Kotlin to
2.1.21
.
2.7.2
2.7.1
2.7.0
Changelog:
🚀 Features
⚠️ Breaking changes
- Rename
MokkeryCallScope.context
toMokkeryCallScope.mokkeryContext
and now it's inherited fromMokkeryScope
♻️ 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
2.6.0
2.5.1
Changelog:
✨ Improvements
- #19 Preserve generic arguments for a mocked type so that
MockMode.autofill
andMockMode.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 thekotlin.k2.only.bundled.compiler.plugins.enabled
flag in the IDE registry (Shift + Shift
and search forRegistry
) .
2.5.0
Changelog:
🚀 Features
- #34 Now it is possible to intercept mock calls with
MokkeryCallInterceptor
. Currently, it allows intercepting just before returning an answer. UseMokkeryCallInterceptor.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
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
to1.9.0