Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cmeeren opened this issue Jan 26, 2022 · 1 comment
Closed

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

cmeeren opened this issue Jan 26, 2022 · 1 comment

Comments

@cmeeren
Copy link

cmeeren commented Jan 26, 2022

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 added a commit to ratsclub/expecto that referenced this issue Apr 20, 2023
@ratsclub
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants