diff --git a/tests/lib/rules/no-missing-import.js b/tests/lib/rules/no-missing-import.js index 418fe9b3..57b5144c 100644 --- a/tests/lib/rules/no-missing-import.js +++ b/tests/lib/rules/no-missing-import.js @@ -156,82 +156,58 @@ ruleTester.run("no-missing-import", rule, { // typescriptExtensionMap { + name: "settings.node - [] as react - d.ts as d.js", filename: fixture("test.tsx"), - code: "import a from './d.js';", + code: "import d from './d.js';", env: { node: true }, - settings: { - node: { typescriptExtensionMap: tsReactExtensionMap }, - }, - }, - { - filename: fixture("test.ts"), - code: "import a from './d.js';", - env: { node: true }, - settings: { - node: { typescriptExtensionMap: tsReactExtensionMap }, - }, + settings: { node: { typescriptExtensionMap: tsReactExtensionMap } }, }, { + name: "settings.node - [] as react - e.tsx as e.js", filename: fixture("test.tsx"), - code: "import a from './e.js';", - env: { node: true }, - settings: { - node: { typescriptExtensionMap: tsReactExtensionMap }, - }, - }, - { - filename: fixture("test.ts"), - code: "import a from './e.js';", + code: "import e from './e.js';", env: { node: true }, - settings: { - node: { typescriptExtensionMap: tsReactExtensionMap }, - }, + settings: { node: { typescriptExtensionMap: tsReactExtensionMap } }, }, { + name: "options[0] - [] as react - d.ts as d.js", filename: fixture("test.tsx"), - code: "import a from './d.js';", - options: [{ typescriptExtensionMap: tsReactExtensionMap }], - env: { node: true }, - }, - { - filename: fixture("test.ts"), - code: "import a from './d.js';", + code: "import d from './d.js';", options: [{ typescriptExtensionMap: tsReactExtensionMap }], env: { node: true }, }, { + name: "options[0] - [] as react - e.tsx as e.js", filename: fixture("test.tsx"), - code: "import a from './e.js';", - options: [{ typescriptExtensionMap: tsReactExtensionMap }], - env: { node: true }, - }, - { - filename: fixture("test.ts"), - code: "import a from './e.js';", + code: "import e from './e.js';", options: [{ typescriptExtensionMap: tsReactExtensionMap }], env: { node: true }, }, // tsx mapping by name { + name: "options[0] - preserve - e.tsx as e.jsx", filename: fixture("test.tsx"), code: "import e from './e.jsx';", options: [{ typescriptExtensionMap: "preserve" }], env: { node: true }, }, { + name: "options[0] - react - e.tsx as e.js", filename: fixture("test.tsx"), code: "import e from './e.js';", options: [{ typescriptExtensionMap: "react" }], env: { node: true }, }, { + name: "settings.node - preserve - e.tsx as e.jsx", filename: fixture("test.tsx"), code: "import e from './e.jsx';", settings: { node: { typescriptExtensionMap: "preserve" } }, env: { node: true }, }, { + name: "settings.node - react - e.tsx as e.js", filename: fixture("test.tsx"), code: "import e from './e.js';", settings: { node: { typescriptExtensionMap: "react" } }, @@ -240,31 +216,37 @@ ruleTester.run("no-missing-import", rule, { // tsx from config { + name: "tsconfig - jsx: react - e.tsx as e.js", filename: fixture("ts-react/test.tsx"), code: "import e from './e.js';", env: { node: true }, }, { + name: "tsconfig - jsx: react - d.ts as d.js", filename: fixture("ts-react/test.ts"), code: "import d from './d.js';", env: { node: true }, }, { + name: "tsconfig - jsx: preserve - e.tsx as e.jsx", filename: fixture("ts-preserve/test.tsx"), code: "import e from './e.jsx';", env: { node: true }, }, { + name: "tsconfig - jsx: preserve - d.ts as d.js", filename: fixture("ts-preserve/test.ts"), code: "import d from './d.js';", env: { node: true }, }, { + name: "tsconfig - extends: base (jsx: react) - e.tsx as e.js", filename: fixture("ts-extends/test.tsx"), code: "import e from './e.js';", env: { node: true }, }, { + name: "tsconfig - extends: base (jsx: react) - d.ts as d.js", filename: fixture("ts-extends/test.ts"), code: "import d from './d.js';", env: { node: true },