test: refactor for test-fs-readfile-error
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
Description of change
- use const instead of var
- use common.mustCall to control the functions execution automatically
- use assert.strictEqual instead assert.equal
- use assert.notStrictEqual instead assert.notEqual
- use arrow functions