test: fix hijackStdout behavior in console
console.log
and some other function will swallow the exception in stdout.write
. So an asynchronous exception is needed, or common.hijackStdout
won't detect some exception.
Refs: https://github.com/nodejs/node/blob/v8.2.1/lib/console.js#L87
Checklist
-
make -j4 test
-
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test