assertk.assertions / isFailure

isFailure

fun <T> Assert<Result<T>>.isFailure(): Assert<Throwable>

Platform and version requirements: Common

Asserts the given assertk.Result threw an exception, returning that exception if it was or failing it if didn't.

assertThat { throw Exception("error") }.isFailure().hasMessage("error")