test: improve logged errors
To indicate which lines are test lines and which are from Node.js core,
it's good to rely upon util.inspect()
while inspecting errors. Using it also logs error properties and provides more informations about the error.
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