You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally, the "to be truthy" assertion does not take any value as it simply asserts that a subject can be coerced to a boolean true (in the case of "to be falsy" it is coercion to boolean false).
It seems that early on these assertions inherited an optional form where a custom message can be supplied as their argument - this was likely inspired by earlier assertions frameworks (assert on node still supports forms like this for example).
These two forms of the assertion are at odds with most other assertions where values are consistently used as part of the assertion. Thus, we wish to remove them.
The text was updated successfully, but these errors were encountered:
alexjeffburke
changed the title
Remove the optional message form of "to be truthy" and "to be falsy".
Remove the optional message form of "to be truthy" and "to be falsy"
Dec 7, 2019
Normally, the "to be truthy" assertion does not take any value as it simply asserts that a subject can be coerced to a boolean true (in the case of "to be falsy" it is coercion to boolean false).
It seems that early on these assertions inherited an optional form where a custom message can be supplied as their argument - this was likely inspired by earlier assertions frameworks (
assert
on node still supports forms like this for example).These two forms of the assertion are at odds with most other assertions where values are consistently used as part of the assertion. Thus, we wish to remove them.
The text was updated successfully, but these errors were encountered: