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

assertThrow always passes when message is empty #137

Closed
timnew opened this issue Feb 2, 2013 · 0 comments
Closed

assertThrow always passes when message is empty #137

timnew opened this issue Feb 2, 2013 · 0 comments

Comments

@timnew
Copy link
Contributor

timnew commented Feb 2, 2013

assertThrow always passes when the message of the error is "".

function badFunc() {
  throw new Error('');
}

// The following assertion should be failed but passed
badFunc.should.throw('Some Message'); 
timnew added a commit to timnew/chai that referenced this issue Feb 2, 2013
logicalparadox added a commit that referenced this issue Feb 3, 2013
Fix defect #137 assertThrow always passes when message is empty
logicalparadox added a commit that referenced this issue Feb 3, 2013
* master:
  Fix issue #137, test message existence by using message!=null rather than using message
  Fixed backwards negation messages.
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