Given this code:
var assert = require(\'assert\'); function boom(){ throw new Error(\'BOOM\'); } assert.throws( boom(), Error );
I ge
You can use bind():
assert.throws( boom.bind(null), Error );
With arguments it is:
assert.throws( boom.bind(null, "This is a blowup"), Error );