In Unexpected core we have a series of assertions for properties/keys of objects that are almost identical. At a high level, the main difference between the "properties" and "keys" variants is whether they agree with our undefined ignoring semantics and/or accept vargs or an array of strings.
TL;DR I believe we should deprecate undesirable variants now for removal in Unexpected 12. I have marked those those I consider candidates below.
Based on earlier discussion (https://gitter.im/unexpectedjs/unexpected?at=5de56d5b9319bb5190cefcf0), the "to have keys" is the only remaining assertions in core that does not adhere to our ignoring undefined rules. For this reason I worked from the angle that these should be considered for removal.
Suggested deprecations
The following assertions all exist in cleaner variants.
Noted during research
The following assertions are duplicated, but their implementations are small and thus I accept that the churn might not be worthwhile.
- "to have key " docs
- almost identical to "to have property <string>"
- "to have keys " docs
- almost identical to "to have properties <array>"
In Unexpected core we have a series of assertions for properties/keys of objects that are almost identical. At a high level, the main difference between the "properties" and "keys" variants is whether they agree with our undefined ignoring semantics and/or accept vargs or an array of strings.
TL;DR I believe we should deprecate undesirable variants now for removal in Unexpected 12. I have marked those those I consider candidates below.
Based on earlier discussion (https://gitter.im/unexpectedjs/unexpected?at=5de56d5b9319bb5190cefcf0), the "to have keys" is the only remaining assertions in core that does not adhere to our ignoring undefined rules. For this reason I worked from the angle that these should be considered for removal.
Suggested deprecations
The following assertions all exist in cleaner variants.
Noted during research
The following assertions are duplicated, but their implementations are small and thus I accept that the churn might not be worthwhile.