Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bnoordhuis committed Aug 29, 2012
1 parent 459717e commit e4cef1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/api/assert.markdown
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/assert.js
Expand Up @@ -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)));
};

Expand Down

0 comments on commit e4cef1a

Please sign in to comment.