-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KON-427 Add suppressName
parameter to assertTrue
and assertFalse
#557
KON-427 Add suppressName
parameter to assertTrue
and assertFalse
#557
Conversation
Nice, I think We are on the right track here. I think we could add .assert(suppressName = koTestName) You have probably seen this, but to test locally follow this guide https://docs.konsist.lemonappdev.com/help/contributing#testing-changes-locally |
11a5084
to
5dc61b7
Compare
0ef045e
to
1c9283e
Compare
Adjust
I tried to make a property extension for Let me know your thoughts, otherwise if you agree, I can investigate further in order to improve the usage of the API on the following releases. |
suppressName
parameter to assertTrue
and assertFalse
suppressName
parameter to assertTrue
and assertFalse
suppressName
parameter to assertTrue
and assertFalse
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.lemonappdev:konsist](https://konsist.lemonappdev.com/) ([source](https://togithub.com/LemonAppDev/konsist)) | `0.12.2` -> `0.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.lemonappdev:konsist/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.lemonappdev:konsist/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.lemonappdev:konsist/0.12.2/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.lemonappdev:konsist/0.12.2/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>LemonAppDev/konsist (com.lemonappdev:konsist)</summary> ### [`v0.13.0`](https://togithub.com/LemonAppDev/konsist/releases/tag/v0.13.0) #### What's Changed This release focuses on improving [KoTest](https://kotest.io) support. <img width="300" alt="image" src="https://github.com/LemonAppDev/konsist/assets/530122/08075608-423d-4b29-8736-84d47ff5503d"> From this point, Konsit will have a first-class KoTest support meaning that every following release will be developed with KoTest support in mind. At the moment we have addressed known issues and improved the API. If you think something is still missing just let us [know on Slack](https://kotlinlang.slack.com/archives/C05QG9FD6KS). We would like to add more KoTest snippets to our documentation, but first, we want to see how you are using Konsist with KoTest (let us know). On top of that, we have introduced, new assertions, multiple improvements and bug fixes (thanks to your feedback🙏). Some of our efforts happen in the background. For instance, we improve documentation are enhance the CI setup and release process to facilitate a more frequent release schedule. We're enhancing documentation, CI setup, and the release process for more regular updates. Additionally, we aim to make the Konsist backlog and roadmap public to boost transparency and community involvement. Big claps go towards [@​JonathanSarco](https://togithub.com/JonathanSarco) for his open-source contributions to the Konsist codebase 👏. ##### 1. Improved Assertions ```kotlin Konsist .scopeFromProject() .classes() .assertTrue { ... } // previously assert { ... } Konsist .scopeFromProject() .classes() .assertFalse { ... } // previously assertNot { ... } ``` We have relaxed the empty list behavior. Konsist test will pass on an empty list to match the behavior of methods in Kotlin collection processing: ```kotlin Konsist .scopeFromProject() .classes() .filter { it.name == "non existing class name" } .assertTrue { ... } // no crash ``` We have also added a `strict` parameter to restore old behavior: ```kotlin Konsist .scopeFromProject() .classes() .filter { it.name == "non existing class name" } .assertTrue(strict = true) { ... } // crash ``` The `assertTrue` and `assertFalse` can be called on a single declaration: ```kotlin Konsist .scopeFromProject() .classes() .first() .assertTrue { ... } Konsist .scopeFromProject() .classes() .first() .assertFalse { ... } ``` We have added new assertions. Now you can verify if certain queries result in empty or non-empty lists with ` assertEmpty() ` and `assertNotEmpty()`: ```kotlin Konsist .scopeFromPackage("..data..") .classes() .assertEmpty() Konsist .scopeFromPackage("..data..") .classes() .assertNotEmpty() ``` You can now check whether a specific query is invoked on a null or non-null declaration. ```kotlin Konsist .scopeFromProject() .classes() .first() .assertNull() Konsist .scopeFromProject() .classes() .first() .assertNotNull() ``` The `assertArchitecture` assertion on the list of files (previously it worked only on `KoScope`): ```kotlin // Works as before Konsist .scopeFromProject() .assertArchitecture { ... } // Now files can be further processed before asserting architecture Konsist .scopeFromProject() .files .filter { ... } .assertArchitecture { ... } ``` The additionalMessage param allows to provision of additional messages that will be displayed with the failing test. This may be a more detailed description of the problem or a hint on how to fix the issue: ```kotlin Konist .scopeFromProject() .classes() .assertFalse(additionalMessage = "Do X to fix the issue") { ... } ``` ##### 2. Improved KoTest Support We've allowed assertions for individual declaration (previously list of declarations was required). ```kotlin Konsist .scopeFromProject() .classes() .first() .assertTrue { } // now possible ``` Due to Kotlin/JVM limitation, the test name has to be passed manually for each `KoTest` test. We have added a dedicated `testName` argument (`assertTrue` and `assertFalse` methods). The test name is used in two ways - as a test name displayed in the failing test crash and as a `suppressName` used for suppressing tests. While this solution may not be perfect (unlike JUnit tests which don't require this), it's still effective and works well. We are open to making it better, but ATM we are stuck. The upcoming [The K2 Compiler](https://blog.jetbrains.com/kotlin/2023/02/k2-kotlin-2-0/) may provide a more convenient alternative. With the new `testName` parameter the KoTest test can be now suppressed: ```kotlin Konsist .scopeFromProject() .classes() .assert(testName = "custom suppress name") { ... } // Suppression by custom name passed as an argument @​Suppress("custom supress name") class Car { } // Suppression by custom name passed as argument also works with `konsist.` prefix // This prefix does not have to be explicitly specified for the `testName` argument @​Suppress("konsist.custom supress name") class Car { } ``` We have added multiple [KoTest starter projects](https://togithub.com/LemonAppDev/konsist/tree/main/samples/starter-projects). Each project has `Konsist` and `KoTest` preconfigured configured and a single `KoTest` test: - konsist-starter-android-gradle-groovy-kotest - konsist-starter-android-gradle-kotlin-kotest - konsist-starter-kmp-gradle-kotlin-kotest - konsist-starter-spring-gradle-groovy-kotest - konsist-starter-spring-gradle-kotlin-kotest We have also updated snippets to include a few KoTest examples (help us with adding a few more). The entire Konsist documentation was updated to take KoTest into consideration. ##### 3. Added support for getters & setters Now Konsist will allow to access and verify setters and getters. For example, now it is possible to verify if a given property has a `getter` (or `setter`): ```kotlin Konsist .scopeFromProject() .properties() .assertTrue { it.hasGetter && it.hasSetter} ``` ```kotlin Konsist .scopeFromProject() .properties() .getters .assertTrue { it.hasBlockBody } ``` ##### 4. Ability to check block body and expression body With declarations such as functions, getters, and setters you can now they the type of the body (`block` or `expression`): ```kotlin Konsist .scopeFromProject() .functions() .assertTrue { it.hasExpressionBody} ``` ```kotlin Konsist .scopeFromProject() .properties() .getters .assertTrue { it.hasBlockBody } ``` ##### 5. Ability to check return value You can check if functions have a return value: ```kotlin Konsist .scopeFromProject() .functions() .assertTrue { it.hasReturnValue } ``` ##### 6. Ability to inspect property value You can check if properties have a value: ```kotlin Konsist .scopeFromProject() .properties() .assertTrue { it.hasValue() } ``` Assert if property has a given value: ```kotlin Konsist .scopeFromProject() .properties() .assertTrue { it.value.startsWith("preffix") } ``` Filter properties with given value: ```kotlin Konsist .scopeFromProject() .properties() .withValue { it.startsWith(“prefix”) } .assertTrue { ... } ``` ##### 7. Added `withName/withoutName` with predicate parameter Now it is possible to call `withName` and `withoutName` with the specified predicate: ```kotlin Konsist .scopeFromProject() .properties() .withName { it.startsWith(“prefix”) || it.endsWith(“suffix”) } .assertTrue { ... } ``` ##### 8. Improved `hasX` methods We have deprecated all `containsX` methods and instead added some methods with `has` prefixes (like `hasX`, `hasAllX` etc.): ```kotlin Konsist .scopeFromProject() .interfaces() .assertTrue { it.hasClasses() } Konsist .scopeFromProject() .classes() .assertTrue { it.hasProperty { prop -> prop.hasValue() } } Konsist .scopeFromProject() .classes() .assertTrue { it.hasAllProperties { prop -> prop.hasValue() } } ``` ##### 9. Improved Scope Creation We are continuing our exploration of [JGit](https://www.eclipse.org/jgit/) and other APIs to enhance various development workflows e.g. a way to run Konsist Tests only on files modified in a given PR. We have added a new way of creating the scope: ```kotlin // Create scope from paths Konsist.scopeFromFiles("Repository.kt", "path\UseCase.kt") // Create scope from set of paths val paths = setOf("Repository.kt", "path\UseCase.kt") Konsist.scopeFromFiles(paths) ``` #### 10. What’s Next? We are hearing the community feedback. The top 1 requested feature is the `declaration references`. We want to enable a way to retrieve parents (of a given class/interface/companion object) as Konsist declarations, rather than string names. You will be able to verify the properties of the parent in the Konsist test. This API is not finalized yet, but we are aiming to expose `parents` property containing a list of Konsist declarations: ```kotlin Konsist .scopeFromProject() .classes() .assertTrue { it.parents.any { parent -> parent.hasAnnotationOf<Repository> } ``` We also want to take a look at architecture assertions. Exact changes are quite a vague ATM, but we have a few community-driven threads to process and rethink our approach. We will consider adding “optional/empty layers” and add a few other tweaks to the Konsist API. Thank you for your engagement using Konsist 🙏 (if you got here you must be really engaged Konsist community member congratulations 🥳). If you are missing something let us know. #### Complete list of changes: #####⚠️ Breaking API Changes - KON-521 Rename `KoReturnTypeProvider` To `KoReturnProvider` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#668 - KON-199 Add `value` To KoPropertyDeclaration by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#682 - KON-181 Add Separate Provider For Any KDoc Tag by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#576 ##### 🐛 Bug Fixes - KON-527 `Properties Are Declared Before Functions` Test Treat Secondary Constructor As Function by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#667 - KON-455 Fix Broken `fullyQualifiedName` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#567 - KON-530 Rename `KoImplementationProvider` To `KoInitializerProvider` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#681 - KON-532 `hasBlockBody` In KoBodyProvider Returns True When Declaration Has No Body by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#680 - KON-529 Throw `KoAssertionFailedException` In `assertArchitecture` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#671 - KON-526 Rename `suppressName` To `testName` And Update Error Logic by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#670 ##### 💡 Improvements - KON-413 Change `containsX` To `hasX` And Add `hasAllX` Methods by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#592 - KON-426 Add Possibility To Call `assert` On Single Declaration by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#525 - KON-288 Throw `KoAssertionFailedException` Instead Of `KoCheckFailedException` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#669 - KON-536 Extract File Extensins by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#686 - KON-535 Improve Error Message For Ktfile Creation by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#685 - KON-197 Add Getter Declaration by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#664 - KON-528 Add Setter Declaration by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#676 - KON-202 Add `hasExpressionBody` And `hasBlockBody` To KoFunctionDeclaration by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#652 - KON-299 Simplify Private Methods In ApiKonsistTest by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#672 - KON-257 Add assert architecture on list of files by [@​JonathanSarco](https://togithub.com/JonathanSarco) in [LemonAppDev/konsist#661 - KON-276 Add Tests To `suppresName` Parameter With KoTest by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#651 - KON-203 Add `hasReturnValue` To KoFunctionDeclaration by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#657 - KON-268 Add `assertEmpty` And `assertNotEmpty` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#648 - KON-269 Update Tests To Use New `assertTrue` And `assertFalse` Methods by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#616 - Using stack walker plus jvmChain by [@​JonathanSarco](https://togithub.com/JonathanSarco) in [LemonAppDev/konsist#569 - Revert Stack Walker by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#631 - KON-134 Calling Assert On The Empty Collection Should Not Throw An Exception by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#564 - KON-427 Add `suppressName` parameter to `assertTrue` and `assertFalse` by [@​JonathanSarco](https://togithub.com/JonathanSarco) in [LemonAppDev/konsist#557 - KON-273 Add `KoTest` Dependency To `integrationTest` by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#601 - KON-293 - Remove deprecated `.hasModifiers()` by [@​JonathanSarco](https://togithub.com/JonathanSarco) in [LemonAppDev/konsist#618 - KON-170 Add `withName` And `withoutName` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#580 - KON-265 Improve Scope Creation by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#589 - KON-150 Add Konsist Test To Check If All `hasX` Methods Are In Provider by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#563 - KON-456 Remove Double Suppression Check by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#570 - KON-184 KoConstructorProviderListExt Change `withConstructor` To `withConstructors` And `withoutConstructor` To `withoutConstructors` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#565 - KON-261 Add `scopeFromFiles` by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#588 ##### 📕 Documentation - Upd Devreadme by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#527 - KON-381 Fix Update Snippet Script To Not Display ## by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#530 - Add article to README.md by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#561 - KON-176 `DeveloperReadMe` Update Naming Conventions Section by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#679 - Update Docs by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#666 - Add android `JetPack Compose` preview snippet by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#658 - Add Junit Snippet by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#662 - Update Snippet by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#663 - Add Social Preview by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#650 - Rename Kmp Projects by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#647 - KON-289 Fix Starter Projects by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#637 - KON-294 Remove Snippet `companion objects are last declarations in the class` by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#617 - KON-428 Add `KoTest` Sample Projects by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#598 - Update Readme by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#612 - KON-278 Add Kotest Snippets by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#602 - Update Dev Readme by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#605 - Update Readme by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#587 - Update Snippet by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#575 - Update Dev Readme by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#573 - Update Logo by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#644 - KON-267 Fix Snippets After Change Default Value Of `includeNested` And `includeLocal` Parameters by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#583 - Update comment by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#633 ##### 🏗️ CI - Update Test Logger Theme by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#572 - KON-195 Rename Python Scripts by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#687 - KON-282 Improve `update-snippet` Script by [@​nataliapeterwas](https://togithub.com/nataliapeterwas) in [LemonAppDev/konsist#639 - KON-291 Verify JVM Bytecode Version by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#638 - Update Ci Setup by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#643 - Update Github Action Name by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#634 - Update Triggers For GitHub Action Snippets by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#636 - Update Script Trigger by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#628 - Update `check-starter-projects.yml` Trigger by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#615 - Update Script Trigger by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#621 - Update Script Trigger by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#623 - Update Script Trigger by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#624 - Update Script Trigger by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#625 - Run Starter Project Checks Only When `samples\starter-rojects` Directory Has Changes or branch name start with `release-` by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#606 - KON-456 Improve snippet verification script by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#571 - Run Starter Projects Check For Updates Triggered By Renovate by [@​igorwojda](https://togithub.com/igorwojda) in [LemonAppDev/konsist#604 ##### 📦 Dependency Upgrade - Update dependency com.lemonappdev:konsist to v0.12.0 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#532 - Update plugin org.jetbrains.kotlin.multiplatform to v1.9.10 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#531 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react-dom to v18.2.0-pre.624 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#529 - Update dependency io.ktor:ktor-server-html-builder-jvm to v2.3.4 - autoclosed by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#533 - Update plugin org.gradle.toolchains.foojay-resolver-convention to v0.7.0 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#538 - Update dependency org.jetbrains.kotlinx:kotlinx-html-jvm to v0.9.1 - autoclosed by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#537 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-emotion to v11.11.1-pre.624 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#536 - Update dependency io.ktor:ktor-server-netty to v2.3.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#534 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react to v18.2.0-pre.624 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#528 - Update dependency com.lemonappdev:konsist to v0.12.1 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#542 - Update plugin org.gradle.toolchains.foojay-resolver-convention to v0.7.0 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#553 - Update dependency org.jetbrains.kotlinx:kotlinx-html-jvm to v0.9.1 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#552 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-emotion to v11.11.1-pre.624 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#551 - Update dependency io.ktor:ktor-server-netty to v2.3.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#550 - Update plugin org.jetbrains.kotlin.multiplatform to v1.9.10 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#548 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react to v18.2.0-pre.624 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#544 - Update dependency io.ktor:ktor-server-html-builder-jvm to v2.3.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#549 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react-dom to v18.2.0-pre.624 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#547 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-emotion to v11.11.1-pre.625 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#558 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react to v18.2.0-pre.625 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#559 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react-dom to v18.2.0-pre.625 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#560 - Update dependency androidx.navigation:navigation-fragment-ktx to v2.7.3 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#577 - Update dependency androidx.navigation:navigation-ui-ktx to v2.7.3 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#578 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-emotion to v11.11.1-pre.626 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#581 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react to v18.2.0-pre.626 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#582 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react-dom to v18.2.0-pre.626 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#584 - Update spring boot to v3.1.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#585 - Update dependency io.mockk:mockk to v1.13.8 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#591 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-emotion to v11.11.1-pre.627 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#595 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react to v18.2.0-pre.627 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#596 - Update dependency org.jetbrains.kotlin-wrappers:kotlin-react-dom to v18.2.0-pre.627 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#597 - Update dependency com.lemonappdev:konsist to v0.12.2 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#614 - Update dependency org.jetbrains.kotlinx:kotlinx-html-jvm to v0.10.0 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#608 - Update dependency io.ktor:ktor-server-netty to v2.3.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#642 - Update dependency io.ktor:ktor-server-html-builder-jvm to v2.3.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#641 - Update plugin com.android.application to v8.1.2 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#654 - Update plugin com.android.library to v8.1.2 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#655 - Update tj-actions/changed-files action to v39.2.1 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#665 - Update dependency androidx.navigation:navigation-fragment-ktx to v2.7.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#673 - Update dependency androidx.navigation:navigation-ui-ktx to v2.7.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#674 - Update dependency gradle to v8.4 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#675 - Update dependency io.ktor:ktor-server-netty to v2.3.5 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#678 - Update dependency io.ktor:ktor-server-html-builder-jvm to v2.3.5 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#677 - Update dependency com.google.android.material:material to v1.10.0 by [@​renovate](https://togithub.com/renovate) in [LemonAppDev/konsist#683 **Full Changelog**: LemonAppDev/konsist@v0.12.2...v0.13.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/typesafegithub/github-workflows-kt). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNy44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Piotr Krzeminski <git@krzeminski.it>
Issue is that when using Kotest in combination with Konsist, the testName is not been captured due to that the execution of Kotest provides a CustomDSL and it works on a different context from which the name cannot be caught in the current way with konsist.
suppressName
to test for KoTest context.Usage:
I will make another round to test it. I struggled a bit with the naming of the test because of adding the suppress name.
Simplified the call to get method name
val testMethodName: String = suppressName ?: getTestMethodNameFromSixthIndex()