ktor-arrow-example icon indicating copy to clipboard operation
ktor-arrow-example copied to clipboard

Refactor to kotlin.assert and power-assert

Open nomisRev opened this issue 2 years ago • 3 comments
trafficstars

Rationale: https://jamesward.com/2023/09/20/asserttrue_test_dsls_legacy/

https://github.com/bnorm/kotlin-power-assert

Kotest shouldBe is not compatible with the required signature of power-assert, so we should refactor to kotlin.test.

nomisRev avatar Sep 27 '23 07:09 nomisRev

Hi Simon, does this mean replacing kotest altogether or just refactoring the assertions?

tibtof avatar Oct 17 '23 11:10 tibtof

Hey @tibtof,

Thank you for your interest in the project!

We only need to refactor from Kotest assertions to Kotlin-test assertions to get the benefits of kotlin-power-assert. The rest can stay Kotest.

nomisRev avatar Oct 19 '23 09:10 nomisRev

Hey Simon, I created a PR with an example. I will continue with the rest of the tests if it's the right direction. However, some assertions are still better in kotest, such as .shoulfBeRight. I would keep the assertions from kotest that also extract a value. Here is an example result: image

tibtof avatar Oct 23 '23 20:10 tibtof