Skip to content

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test, tools

Merge request reports

Loading