-
-
Notifications
You must be signed in to change notification settings - Fork 697
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
The assert.fail([message])
format should be supported for compatibility with NodeJS assert interface
#1116
Comments
s-leroux
added a commit
to s-leroux/chai
that referenced
this issue
Jan 5, 2018
s-leroux
added a commit
to s-leroux/chai
that referenced
this issue
Jan 5, 2018
In relation to chaijs#1116, the `assert.fail` interface should accept ibeing called with only 1 arguments to fail with a custom message.
s-leroux
added a commit
to s-leroux/chai
that referenced
this issue
Jan 11, 2018
Fix chaijs#1116. The `assert.fail` interface should accept being called with only 1 arguments to fail with a custom message.
s-leroux
added a commit
to s-leroux/chai
that referenced
this issue
Jan 11, 2018
Fix chaijs#1116. The `assert.fail` interface should accept being called with only 1 arguments to fail with a custom message.
s-leroux
added a commit
to s-leroux/chai
that referenced
this issue
Jan 11, 2018
Fix chaijs#1116. The `assert.fail` interface should accept being called with only 1 arguments to fail with a custom message.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The NodeJS assert interface supports being called with 1 (or 0) arguments:
https://nodejs.org/api/assert.html#assert_assert_fail_message
But currently Chai's
assert.fail
only supports being called with 2 (or more arguments) leading to that idiom to fail with a custom error message:The interface should be modified so we can write that instead:
The text was updated successfully, but these errors were encountered: