Skip to content

Commit

Permalink
testing: throw exception for all rules missing line with errors e…
Browse files Browse the repository at this point in the history
…xcept for temporary exception for `require-param``
  • Loading branch information
brettz9 committed May 15, 2021
1 parent db1f289 commit 9fb6b36
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@ const ruleTester = new RuleTester();
return assertion;
});
if (count) {
// eslint-disable-next-line no-console -- CLI
console.log(
`Rule, \`${ruleName}\`, missing line numbers in errors: ${count}`,
);
// Make an exception for now for `require-param` as it helps to find the
// many lines were it is missing to know which tests to check without
// adding false (or failing) expectations now
if (ruleName === 'require-param') {
// eslint-disable-next-line no-console -- CLI
console.log(
`Rule, \`${ruleName}\`, missing line numbers in errors: ${count}`,
);
} else {
throw new Error(`Rule, \`${ruleName}\`, missing line numbers in errors: ${count}`);
}
}

assertions.valid = assertions.valid.map((assertion) => {
Expand Down

0 comments on commit 9fb6b36

Please sign in to comment.