From 3133c4e5e23b6ee82e72aca815ffa38f6e69f959 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 16 Aug 2023 11:49:11 -0700 Subject: [PATCH] test: properly report missing errors; use file extension in import --- test/rules/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/rules/index.js b/test/rules/index.js index 9f444abe0..ce84976ea 100644 --- a/test/rules/index.js +++ b/test/rules/index.js @@ -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); @@ -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++;