v4.x: backport of "test: refactor test-fs-non-number-arguments-throw"
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
test, fs, v4.x
Description of change
- Add RegExp arguments to throws assertions.
- Use common.mustCall for emitter callback.