import io.kotest.matchers.shouldBe
import org.junit.jupiter.api.Test
class Test {
@Test
fun `it should pass`() {
val meters = 1749
val expected = "1,5km"
meters.formatToKm() shouldBe expected
}
}
Discover Kotest matchers to make readable assertions - many of them are available as infix functions, allowing you to write DSL style tests
Enjoy KotlinTesting.com quick tips?
Share it to fellow developers on social media!