kotest-assertions / io.kotest.assertions / asClue

asClue

inline fun <T : Any, R> T.asClue(block: (T) -> R): R

Similar to withClue, but will add this as a clue to the assertion error message in case an assertion fails. Can be nested, the error message will contain all available clues.

Parameters

block - the code with assertions to be executed

Return
the return value of the supplied block