assert: wrap original err on `ifError` fail
For assert.ifError
fails, wrap the original err in a new AssertionError
Inspiration: https://github.com/nodejs/node/issues/12803#issuecomment-299041508 /cc @nodejs/testing
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
test, assert