doc: update assert.doesNotThrow() docs
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 29 Aug 2012 00:30:15 +0000 (02:30 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Wed, 29 Aug 2012 00:36:22 +0000 (02:36 +0200)
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.

doc/api/assert.markdown
lib/assert.js

index c93c1e7..5849f6d 100644 (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.
 
index 70dc0b0..f81c203 100644 (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)));
 };