kotest-core / io.kotest.core / executeWithAssertionsCheck

executeWithAssertionsCheck

suspend fun AssertionMode.executeWithAssertionsCheck(run: suspend () -> Unit, name: String): Unit

Executes the given run function checking for the absense of assertions according to the receiver AssertionMode.

Exceptions

ZeroAssertionsError - if the mode is AssertionMode.Error and no assertions were executed.