throwsErrorWith

infix fun <T> AnsweringScope<T>.throwsErrorWith(message: Any)

Function call always throws an IllegalStateException with given message.

This is equivalent of kotlin.error.