refactor: replace assert.throws in tests with common.expectsError
Refactored tests to replace assert.throws(fn, common.expectsError(err));
with common.expectsError(fn, err);
in following test files :
- test/parallel/test-async-hooks-asyncresource-constructor.js
- test/parallel/test-async-wrap-constructor.js
- test/parallel/test-buffer-alloc.js
- test/parallel/test-buffer-arraybuffer.js
- test/parallel/test-buffer-compare-offset.js
- test/parallel/test-buffer-compare.js
- test/parallel/test-buffer-concat.js
- test/parallel/test-buffer-fill.js
- test/parallel/test-buffer-new.js
- test/parallel/test-buffer-read.js
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