test: refactor common.expectsError()
- Report values in assertions.
- Strict equality match if message is a string.
- instanceof/typeof instead of deprecated util.isRegExp()
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
test errors