kotest-assertions / io.kotest.assertions / Failures

Failures

object Failures

Handles creation of errors and cleaning of stack traces.

Properties

shouldRemoveKotestElementsFromStacktrace

Whether Kotest-related frames will be removed from the stack traces of thrown AssertionErrors.

var shouldRemoveKotestElementsFromStacktrace: Boolean

Functions

clean

JVM only: If shouldRemoveKotestElementsFromStacktrace is true, the stacktrace will be reduced to the user-code StackTrace only.

fun clean(throwable: Throwable): Throwable

failure

Creates an AssertionError with the given message and cause

fun failure(message: String): AssertionErrorfun failure(message: String, cause: Throwable?): AssertionError
fun failure(message: String, expectedRepr: String, actualRepr: String): Throwable