Skip to content

Commit

Permalink
test: ensure no-restricted-imports works with NodeJS imports (#15907)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Mazuk committed May 23, 2022
1 parent 901ce0f commit 55534f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/lib/rules/no-restricted-imports.js
Expand Up @@ -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
}]
}
]
});

0 comments on commit 55534f1

Please sign in to comment.