kotest-core / io.kotest.core.spec / autoClose

autoClose

fun <T : AutoCloseable> TestConfiguration.autoClose(closeable: T): T

Register an AutoCloseable so that it's close methods is automatically invoked when the tests are completed.

fun <T : AutoCloseable> TestConfiguration.autoClose(closeable: Lazy<T>): Lazy<T>