chore(deps): update dependency dev.mokkery to v3 #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.7.2→3.1.1Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
lupuuss/Mokkery (dev.mokkery)
v3.1.1: 3.1.1Changelog
🐛 Bug fixes
v3.1.0: 3.1.0Changelog
This release focuses on improving mocking classes with parameterized constructors. You can read more about it here.
🚀 Features
notmatcher accepts more than one matcher🐛 Bug fixes
ClassCastExceptionwhen mocking classes with constructors that accepts complex typesv3.0.0: 3.0.0Changelog
This major update introduces a full refactor of the templating mechanism - everything that happens inside
everyandverifyblocks.It addresses a wide range of bugs that previously caused unexpected errors when setting up a behavior for a method,
and it now provides compile-time validation for these blocks.
Also, this version deprecates vararg matchers. Now, any matcher that accepts array can be used with spread operator (*).
The new approach allows you to easily create custom matchers and use them with the spread operator:
every { mock.callWithVarargs(1, *matches { it.size > 2 }, 10) } returns 1 // Matches a call with varargs that starts with 1, ends with 10, and has at least two elements in between.🚀 Features
every/verifymisuses are now reported at compile time.Previously, only methods with constant default values could be mocked.
Now, Mokkery correctly verifies default values computed from other arguments, provided these computations are deterministic.
If the default value is non-deterministic (e.g., random), it cannot be verified because it’s not possible to predict the correct value for the call.
It is no longer necessary to set up an
AutofillProviderto mock a method that accepts or returns a value class.everyandverifyon the same mock in parallel.containsAllforIterableand array types. Matches a collection in which all elements satisfy the predicate.containsAnyforIterableand array types. Matches a collection in which any element satisfies the predicate.ArgMatchersScope(renamed toMokkeryMatcherScope) no longer contains the methodfun <T> matches(argType: KClass<*>, matcher: ArgMatcher<T>): T.Its usage should be replaced with the extension function
fun <T> MokkeryMatcherScope.matches(matcher: ArgMatcher<T>): T.compose,isFilled, andassertFilledmethods have been removed fromArgMatcher.Composite. Refer to thedev.mokkery.matcher.matchesCompositedocumentation and existing implementations for the new approach to implementing composite matchers.dev.mokkery.templating.extanddev.mokkery.templating.ctxAPIs to mock methods with extension receivers or context parameters.🐛 Bug fixes
♻️ Deprecations
All deprecated functions have suggestions for replacement set up, so migration should be straightforward.
ArgMatchersScopeis renamed toMokkeryMatcherScope.VarArgMatcher,varargsAny,varargsAll,anyVarargs.They should be replaced with equivalent regular matchers.
eqis deprecated - it can be omitted.neqis deprecated - replace withnot.eqRefis renamed toref.neqRefis deprecated - replace withnot(ref(...)).matchingandmatchingByare renamed tomatchesandmatchesBy.FunctionScopeAPI.✨ Improvements
KotlinMetadataTarget.v2.10.2: 2.10.2Changelog:
🐛 Bug fixes
MokkerySuiteScope.mocksreturning incorrect reference for JS function mocks🌳 Dependencies
kotlinx.atomicfuto0.29.0.2.2.21.1.17.8v2.10.1: 2.10.1Changelog
🐛 Bug fixes
NoClassDefFoundErrror: dev/mokkery/plugin/core/Mokkery$ErrorsNote that if you are affected by this issue, you need to clear the Gradle caches for the fix to work. Please read the issue description for more details.
v2.10.0: 2.10.0Changelog:
🚀 Features
callsusingcallSpiedorcallSpiedWithMokkeryBlockingCallScope.callSpiedandMokkerySuspendCallScope.callSpied♻️ Deprecations
FunctionScopeAPI from warning to error. It will be removed in Mokkery 3.0.0.🐛 Bug fixes
2.2.20CallArgumentconstructor resolution by the compiler pluginv2.9.0: 2.9.0Changelog:
2.2.0.🐛 Bug fixes
2.2.0v2.8.0: 2.8.0Changelog:
🚀 Features
MokkeryBlockingCallScopeandMokkerySuspendCallScope.MokkeryCallScope.self<T>.FunctionCall.argValueandFunctionCall.argValues.2.1.20.MokkeryCallScope,MokkeryBlockingCallScope, andMokkerySuspendCallScopefrom thedev.mokkery.interceptorpackage todev.mokkery.♻️ Deprecations
Answer.call(FunctionScope)andAnswer.callSuspend(FunctionScope)in favor of overloads withMokkeryCallScope. A migration guide is available in the Answer interface documentation.✨ Improvements
ApplicationRule.AllTeststo support test fixtures in the future.toStringbehavior with other mocks.🌳 Dependencies
kotlinx.coroutinesto1.10.2.2.1.21.v2.7.3: 2.7.3It's a backport release based on 2.7.2 version to provide a fix for Kotlin 2.1.x users
Changlog:
🐛 Bug fixes
CallArgumentconstructor resolution by the compiler pluginConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.