Skip to content

test,tools: use `.then(common.mustCall())` for all async IIFEs + linter rule

test: use .then(common.mustCall()) for all async IIFEs

This makes sure that all async functions finish as expected.

tools: add linting rule for async IIFEs

The result of an async IIFE should always be handled in our tests, typically by adding .then(common.mustCall()) to verify that the async function actually finishes executing at some point.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading