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

docs: improve throws examples #1113

Merged
merged 1 commit into from Jan 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/chai/interface/assert.js
Expand Up @@ -1940,8 +1940,8 @@ module.exports = function (chai, util) {
* If `errMsgMatcher` is provided, it also asserts that the error thrown will have a
* message matching `errMsgMatcher`.
*
* assert.throws(fn, 'function throws a reference error');
* assert.throws(fn, /function throws a reference error/);
* assert.throws(fn, 'Error thrown must have this msg');
* assert.throws(fn, /Error thrown must have a msg that matches this/);
* assert.throws(fn, ReferenceError);
* assert.throws(fn, errorInstance);
* assert.throws(fn, ReferenceError, 'Error thrown must be a ReferenceError and have this msg');
Expand Down