mirror of https://github.com/nodejs/node.git
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
parent
459717efb6
commit
e4cef1a083
|
@ -74,7 +74,7 @@ Custom error validation:
|
||||||
"unexpected error"
|
"unexpected error"
|
||||||
);
|
);
|
||||||
|
|
||||||
## assert.doesNotThrow(block, [error], [message])
|
## assert.doesNotThrow(block, [message])
|
||||||
|
|
||||||
Expects `block` not to throw an error, see assert.throws for details.
|
Expects `block` not to throw an error, see assert.throws for details.
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ assert.throws = function(block, /*optional*/error, /*optional*/message) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// EXTENSION! This is annoying to write outside this module.
|
// 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)));
|
_throws.apply(this, [false].concat(pSlice.call(arguments)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue