Open robotlolita opened 11 years ago
Perhaps a warning or just an informative failure message for properties that return undefined, since that is unlikely to occur in Claire's style. Maybe an implicit classifier of test cases into which falsey value they return.
Hm. Currently Claire uses null
to signal that a test case was ignored. I can construct a disjoint type to handle this better and have Ignored <reason> | Success <value> | Rejected <value> | Failed <reason>
. That way I believe it should be easy to provide a better reasoning for properties that are rejected with a falsy value.
This would allow a better integration with testing libraries. Right now, if you don't return anything from your property, the property fails. This is cool if you're doing comparisons in your property, since you're always returning a value anyways, but assertion libraries don't usually return a value, and as such you have to end all your properties with
return true
, which makes it not obvious what's being tested.