//arrow-meta-test/arrow.meta.plugin.testing/AssertSyntax/failsWith
[jvm]
open fun failsWith(f: (String) -> Boolean): Assert.SingleAssert
Checks both that code snippet fails and the error message has a certain property which is checked by a provided function.
For instance:
failsWith { it.contains("Expecting a top level declaration") }
jvm
f | function that must return true from the error message as an input. |
Do you like Arrow?
✖