Skip to content

Commit

Permalink
assert: name anonymous functions
Browse files Browse the repository at this point in the history
  • Loading branch information
maasencioh committed Oct 12, 2016
1 parent 774d737 commit 6cbc2a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ function _throws(shouldThrow, block, expected, message) {
// 11. Expected to throw an error:
// assert.throws(block, Error_opt, message_opt);

assert.throws = function(block, /*optional*/error, /*optional*/message) {
assert.throws = function throws(block, /*optional*/error, /*optional*/message) {
_throws(true, block, error, message);
};

// EXTENSION! This is annoying to write outside this module.
assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
assert.doesNotThrow = function doesNotThrow(block, /*optional*/error, /*optional*/message) {
_throws(false, block, error, message);
};

assert.ifError = function(err) { if (err) throw err; };
assert.ifError = function ifError(err) { if (err) throw err; };

0 comments on commit 6cbc2a9

Please sign in to comment.