Skip to content

Commit

Permalink
add fixture using backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Feb 17, 2020
1 parent 3e89ac8 commit 3aa0a0f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/lib/rules/no-restricted-modules.js
Expand Up @@ -107,10 +107,9 @@ ruleTester.run("no-restricted-modules", rule, {
parserOptions: { ecmaVersion: 6 },
errors: [{ messageId: "defaultMessage", data: { name: "fs" }, type: "CallExpression" }]
}, {
// eslint-disable-next-line no-useless-escape
code: "require(`crypt\o`)",
options: ["crypto"],
code: "require(`foo\\\\bar`);",
options: ["foo\\bar"],
parserOptions: { ecmaVersion: 6 },
errors: [{ messageId: "defaultMessage", data: { name: "crypto" }, type: "CallExpression" }]
errors: [{ messageId: "defaultMessage", data: { name: "foo\\bar" }, type: "CallExpression" }]
}]
});

0 comments on commit 3aa0a0f

Please sign in to comment.