tools: eslint rule for assert.throws -> common.expectsError
Pretty straight-forward — eslint rule that checks for usage of assert.throws(fn, common.expectsError(err));
and suggests using common.expectsError(fn, err);
instead.
First commit fixes all remaining instances that violate this rule. Second commit introduces the rule & a test for it.
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, tools