test: enhance test-common.js
- refactor test-common.js so that global leak detection does not need to be disabled
- add test for common.fail()
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test