Skip to content

Commit

Permalink
test: properly report missing errors; use file extension in import
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Aug 16, 2023
1 parent f6946a5 commit 3133c4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const main = async () => {
*/
let assertions;
try {
assertions = (await import(`./assertions/${camelCase(ruleName)}`)).default;
assertions = (await import(`./assertions/${camelCase(ruleName)}.js`)).default;
} catch (error) {
// eslint-disable-next-line no-console -- Reporting back to tester
console.error(error);
Expand All @@ -84,7 +84,7 @@ const main = async () => {
Reflect.deleteProperty(assertion, 'ignoreReadme');
assertion.parserOptions = defaultsDeep(assertion.parserOptions, parserOptions);
for (const error of /** @type {import('eslint').RuleTester.TestCaseError[]} */ (
assertion.errors
assertion.errors || []
)) {
if (!('line' in error)) {
count++;
Expand Down

0 comments on commit 3133c4e

Please sign in to comment.