assert icon indicating copy to clipboard operation
assert copied to clipboard

Allow to pass a thunk as a message factory to assertions

Open simPod opened this issue 5 years ago • 4 comments
trafficstars

It is useful in order to delay generating a message.

At the moment the assertion does not pass the message is generated. Otherwise the thunk is not executed.

simPod avatar Oct 29 '20 10:10 simPod

What would be the real life use case scenario for this?

zerkms avatar Oct 29 '20 19:10 zerkms

Sometimes my error messages are

  1. heavy to compute
  2. touch object properties that are not initialised and are not needed to be initialised except for the error message

so I'd rather skip that for happy path.

simPod avatar Oct 29 '20 19:10 simPod

@BackEndTea Hi, is there a will to add lazy messages?

simPod avatar Apr 29 '22 14:04 simPod