Open
Description
The only pitfall I can really think of is if a developer forgets to document an error in the errors list. For example:
const superCoolFunc = throws(
() => {
console.log('Do something');
throw new SuperCoolError();
throw new SomethingElseError();
},
{ SuperCoolError } // Missing SomethingElseError!
);
... Or vice-versa.
A linter rule could help mitigate this, or some sort of dev-environment-only console error if this happens at runtime
Metadata
Assignees
Labels
No labels