From b943189572099b75e552434cbf26e5821cd5ca60 Mon Sep 17 00:00:00 2001 From: Nick Mazuk Date: Sun, 22 May 2022 18:58:24 -0700 Subject: [PATCH] test: ensure no-restricted-imports works with NodeJS imports --- tests/lib/rules/no-restricted-imports.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/lib/rules/no-restricted-imports.js b/tests/lib/rules/no-restricted-imports.js index 643c87ede17..07d05cbff60 100644 --- a/tests/lib/rules/no-restricted-imports.js +++ b/tests/lib/rules/no-restricted-imports.js @@ -1083,6 +1083,17 @@ ruleTester.run("no-restricted-imports", rule, { column: 1, endColumn: 41 }] + }, + { + code: "import absoluteWithPatterns from '#foo/bar';", + options: [{ patterns: ["\\#foo"] }], + errors: [{ + message: "'#foo/bar' import is restricted from being used by a pattern.", + type: "ImportDeclaration", + line: 1, + column: 1, + endColumn: 45 + }] } ] });