doc: update assert.doesNotThrow() docs

It takes an optional "expected exception" argument that is not used meaningfully
but is nevertheless documented. Undocument it, it confuses casual readers of the
documentation.

Fixes #3935.
pull/24504/head
Ben Noordhuis 2012-08-29 02:30:15 +02:00
parent 459717efb6
commit e4cef1a083
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ Custom error validation:
"unexpected error"
);
## assert.doesNotThrow(block, [error], [message])
## assert.doesNotThrow(block, [message])
Expects `block` not to throw an error, see assert.throws for details.

View File

@ -327,7 +327,7 @@ assert.throws = function(block, /*optional*/error, /*optional*/message) {
};
// EXTENSION! This is annoying to write outside this module.
assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
assert.doesNotThrow = function(block, /*optional*/message) {
_throws.apply(this, [false].concat(pSlice.call(arguments)));
};