power-assert icon indicating copy to clipboard operation
power-assert copied to clipboard

assert.throws does not accept object

Open chadxz opened this issue 7 years ago • 2 comments

as of Node.js v9+, the built-in assert.throws() accepts an object as the "error" parameter. When passed an object, it checks the properties of the error against the properties on the passed object.

Looks like power-assert does not currently support this. Would be great if it could be added!

chadxz avatar Jul 20 '18 17:07 chadxz

is this something you'd accept a PR to add?

chadxz avatar Jul 21 '18 01:07 chadxz

Thanks! I'll support assert.throws more in power-assert v2.

twada avatar Oct 27 '18 07:10 twada