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

fix presumably busted unemptyString #58

Merged
merged 2 commits into from Mar 10, 2016

Conversation

boneskull
Copy link
Contributor

Hi,

I wanted to assert that a function was passed an unempty string, so I wrote something like the following:

import is from 'check-more-types';

function myFunc (value) {
  is.verify.unemptyString(value);
}

myFunc('');

I found that this did not throw an exception. Upon further investigation, verify only throws when the result of a comparison is strictly false. I modified unemptyString() to ensure it always returns a boolean value.

To assert my changes worked, I attempted to run npm test. However, the unit tests were not executed--not sure why. I enabled them as part of this PR. If you would like me to disable them again, I can remove 398a986.

bahmutov added a commit that referenced this pull request Mar 10, 2016
fix presumably busted unemptyString
@bahmutov bahmutov merged commit e230975 into kensho-technologies:master Mar 10, 2016
@bahmutov
Copy link
Contributor

Ohhh, this is such a sweet bug and great fix! I am honestly not using check.verify - only using lazy-ass with checks. I will publish new version after merging with my local code tests shortly.

Huge thank you!

@bahmutov bahmutov added the bug label Mar 10, 2016
@bahmutov
Copy link
Contributor

published as v2.12.0

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

Successfully merging this pull request may close these issues.

None yet

2 participants