home.social

#kotest — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #kotest, aggregated by home.social.

fetched live
  1. In #kotest tests are just functions. So they can be extracted into other extension functions like this:

    fun FunSpec.someTests() {
    test("1") {...}
    test("2") {...}
    }

    Clever but the problem is that you can't run just one test from IDE 😒 Use abstract class instead? #UXfail

  2. In #kotest tests are just functions. So they can be extracted into other extension functions like this:

    fun FunSpec.someTests() {
    test("1") {...}
    test("2") {...}
    }

    Clever but the problem is that you can't run just one test from IDE 😒 Use abstract class instead? #UXfail

  3. Back to #kotest rants. Because kotest has “built in coroutine support at every level” when an assertion fails, you can’t navigate to the matcher source code from the stack trace (Kotlin coroutines are stackless). So good luck if the error message is not very clear.

  4. Back to #kotest rants. Because kotest has “built in coroutine support at every level” when an assertion fails, you can’t navigate to the matcher source code from the stack trace (Kotlin coroutines are stackless). So good luck if the error message is not very clear.

  5. What about namespace "pollution" by extension functions in #Kotlin? E.g. a library with `fun Any?.print()` (yes, it's a #kotest #rant again) will add `print()` to code completion popup for all objects. Sure, IDE can deprioritise it, but maybe don't do it in the first place?

  6. What about namespace "pollution" by extension functions in #Kotlin? E.g. a library with `fun Any?.print()` (yes, it's a #kotest #rant again) will add `print()` to code completion popup for all objects. Sure, IDE can deprioritise it, but maybe don't do it in the first place?

  7. More #kotest #rants... shouldHaveSize() is helpful enough to print the whole (actual) list when sizes don't match. Good idea unless the list contains large data classes. Good luck scrolling around Gradle output for the failure message. OTOH it could be symptom of a bad test 🤔

  8. More #kotest #rants... shouldHaveSize() is helpful enough to print the whole (actual) list when sizes don't match. Good idea unless the list contains large data classes. Good luck scrolling around Gradle output for the failure message. OTOH it could be symptom of a bad test 🤔

  9. Another #kotest #rant is that most of its matchers don’t show diff window in IntelliJ with JUnit5 runner. It tries but most matchers throw AssertionError (no diff) and some AssertionFailedError (has diff) 🤷‍♂️😒 Makes you wonder if kotest authors actually use it via IntelliJ.

  10. Another #kotest #rant is that most of its matchers don’t show diff window in IntelliJ with JUnit5 runner. It tries but most matchers throw AssertionError (no diff) and some AssertionFailedError (has diff) 🤷‍♂️😒 Makes you wonder if kotest authors actually use it via IntelliJ.

  11. Kotest has eventually() function which retries lambda until it succeeds or times out. Not the best idea to use it across all tests in the first place, but in addition kotest prints stack trace from the first and the last failure, so you end up scrolling down 🤦‍ #kotest #rant

  12. Kotest has eventually() function which retries lambda until it succeeds or times out. Not the best idea to use it across all tests in the first place, but in addition kotest prints stack trace from the first and the last failure, so you end up scrolling down 🤦‍ #kotest #rant

  13. Are you ready for !?

    I've prepared my
    example with
    and in with 19 issues for hacktoberfest!

    I'll be giving personal guidance to everyone wanting to learn, and contribute.

    github.com/nomisRev/ktor-arrow

  14. Are you ready for #Hacktoberfest!?

    I've prepared my #JetBrains #Ktor #ArrowKt
    example with #SqlDelight
    #testcontainers and #kotest in #Kotlin with 19 issues for hacktoberfest!

    I'll be giving personal guidance to everyone wanting to learn, and contribute.

    github.com/nomisRev/ktor-arrow