So can we easily add kotest assertions to our project? Lets find out.
We will add the following test to each of our tests:
@Test
fun testKotestAssertion() {
true.shouldNotBeFalse()
}
of course it doesn’t work because they haven’t been included. Adding the dependency in both commonTest and androidInstrumentedTest seems to take care of it (probably will need it in iosTest as well):
implementation(libs.kotest.assertions.core)
now the tests all run with the new kotest assertions so we can charge on ahead and start programming!
One other thing to note is that when you run desktopTests or androidUnitTests they run all the commonTests too. So naturally you write all the common tests in the commonTest source set and they get run under both the androidUnitTest and desktopTest sets.
The updated project can be found here