Skip to content
This repository
Browse code

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.
commit e4cef1a0833e6d677298600e205a142d15639bf2 1 parent 459717e
Ben Noordhuis authored August 29, 2012
2  doc/api/assert.markdown
Source Rendered
@@ -74,7 +74,7 @@ Custom error validation:
74 74
       "unexpected error"
75 75
     );
76 76
 
77  
-## assert.doesNotThrow(block, [error], [message])
  77
+## assert.doesNotThrow(block, [message])
78 78
 
79 79
 Expects `block` not to throw an error, see assert.throws for details.
80 80
 
2  lib/assert.js
@@ -327,7 +327,7 @@ assert.throws = function(block, /*optional*/error, /*optional*/message) {
327 327
 };
328 328
 
329 329
 // EXTENSION! This is annoying to write outside this module.
330  
-assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
  330
+assert.doesNotThrow = function(block, /*optional*/message) {
331 331
   _throws.apply(this, [false].concat(pSlice.call(arguments)));
332 332
 };
333 333
 

0 notes on commit e4cef1a

Please sign in to comment.
Something went wrong with that request. Please try again.