test: report actual error code on failure
Add a message to an assertion in parallel/test-dgram-error-message-address to output the actual error code that doesn't match the allowed errors.
For some context I've been setting up IBM i CI machines to build Node.js on IBM i and this test is failing. The change in this PR has helped diagnose how the test is failing by revealing the actual error code.
Before:
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert(allowed.includes(e.code))
After:
AssertionError [ERR_ASSERTION]: 'Unknown system error -42' was not one of EADDRNOTAVAIL,EAFNOSUPPORT,EPROTONOSUPPORT.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines