Is there a way to add information to the assertio...
# kotest
p
Is there a way to add information to the assertion failures? For example if I do something like
errorOccurred shouldBe false
or
errorOccurred.shouldBe(false)
then the assertion failure says something like
expected:<false> but was:<true>
Is it possible to add more information to make the problem more clear? If it could display the name of the variable being checked that might be enough.
s
You want
withClue
p
Thanks I'll give that a try.
s
I will write some more docs for this
p
That works great, also asClue seems very useful. I should have read the docs 😂
s
There isn't really any docs for this
Just what's on the front page
Kotest has loads of amazing features no one knows about 😂
p
I saw it on the main page about Kotest after you mentioned it, but yes I thought the docs should mention it.
Linked to from the main reference doc now as well
p
Very nice 👍