kotest-assertions / io.kotest.matchers / MatcherResult / failureMessage

failureMessage

abstract fun failureMessage(): String

Returns a message indicating why the evaluation failed for when this matcher is used in the positive sense. For example, if a size matcher was used like mylist should haveSize(5) then an appropriate error message would be "list should be size 5".