haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Document that Expect.isNotEmpty fails if string is only whitespace #428

Closed cmeeren closed 1 year ago

cmeeren commented 2 years ago

Based on the name, I would expect Expect.isNotEmpty to fail only if the string is the empty string, "". I would expect it to pass if the string is non-empty and contains only whitespace, e.g. " ". However, it fails for whitespace strings. This should be documented in the doc comments.

Ideally I'd want the behavior changed, though that would be a breaking change.

ratsclub commented 1 year ago

I agree, I'm going to introduce this on the next major. Thanks!