diff --git a/tests/lib/rules/no-duplicate-imports.js b/tests/lib/rules/no-duplicate-imports.js index 7da472cce27..42d35c85751 100644 --- a/tests/lib/rules/no-duplicate-imports.js +++ b/tests/lib/rules/no-duplicate-imports.js @@ -26,8 +26,6 @@ ruleTester.run("no-duplicate-imports", rule, { "import * as Foobar from \"async\";", "import \"foo\"", "import os from \"os\";\nexport { something } from \"os\";", - "import * as bar from \"os\";\nimport { baz } from \"os\";", - "import foo, * as bar from \"os\";\nimport { baz } from \"os\";", { code: "import os from \"os\";\nexport { hello } from \"hello\";", options: [{ includeExports: true }] @@ -47,14 +45,6 @@ ruleTester.run("no-duplicate-imports", rule, { { code: "import { merge } from \"lodash-es\";\nexport { merge as lodashMerge }", options: [{ includeExports: true }] - }, - { - code: "import os from \"os\";\nexport * from \"os\";", - options: [{ includeExports: true }] - }, - { - code: "export { something } from \"os\";\nexport * from \"os\";", - options: [{ includeExports: true }] } ], invalid: [ @@ -63,22 +53,11 @@ ruleTester.run("no-duplicate-imports", rule, { errors: [{ messageId: "import", data: { module: "fs" }, type: "ImportDeclaration" }] }, { - code: "import { merge } from \"lodash-es\";\nimport { find } from \"lodash-es\";", - errors: [{ messageId: "import", data: { module: "lodash-es" }, type: "ImportDeclaration" }] - }, - { - code: "import { merge } from \"lodash-es\";\nimport _ from \"lodash-es\";", + code: "import { merge } from \"lodash-es\";import { find } from \"lodash-es\";", errors: [{ messageId: "import", data: { module: "lodash-es" }, type: "ImportDeclaration" }] }, { - code: "import os from \"os\";\nimport { something } from \"os\";\nimport * as foobar from \"os\";", - errors: [ - { messageId: "import", data: { module: "os" }, type: "ImportDeclaration" }, - { messageId: "import", data: { module: "os" }, type: "ImportDeclaration" } - ] - }, - { - code: "import * as modns from \"lodash-es\";\nimport { merge } from \"lodash-es\";\nimport { baz } from \"lodash-es\";", + code: "import { merge } from \"lodash-es\";import _ from \"lodash-es\";", errors: [{ messageId: "import", data: { module: "lodash-es" }, type: "ImportDeclaration" }] }, { @@ -87,7 +66,7 @@ ruleTester.run("no-duplicate-imports", rule, { errors: [{ messageId: "export", data: { module: "os" }, type: "ExportNamedDeclaration" }] }, { - code: "import os from \"os\";\nexport { os as foobar } from \"os\";\nexport { something } from \"os\";", + code: "import os from \"os\"; export { os as foobar } from \"os\";\nexport { something } from \"os\";", options: [{ includeExports: true }], errors: [ { messageId: "exportAs", data: { module: "os" }, type: "ExportNamedDeclaration" }, @@ -101,12 +80,7 @@ ruleTester.run("no-duplicate-imports", rule, { errors: [{ messageId: "exportAs", data: { module: "os" }, type: "ExportNamedDeclaration" }] }, { - code: "export * from \"os\";\nexport * from \"os\";", - options: [{ includeExports: true }], - errors: [{ messageId: "export", data: { module: "os" }, type: "ExportAllDeclaration" }] - }, - { - code: "import \"os\";\nexport * from \"os\";", + code: "import os from \"os\";\nexport * from \"os\";", options: [{ includeExports: true }], errors: [{ messageId: "exportAs", data: { module: "os" }, type: "ExportAllDeclaration" }] }