Skip to content

Commit

Permalink
test: add more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Nov 14, 2021
1 parent 156e824 commit 00d053c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/lib/rules/prefer-template.js
Expand Up @@ -365,6 +365,11 @@ ruleTester.run("prefer-template", rule, {
output: "`${a }\\`b\\`` + `\\`c\\`${ d}`",
errors
},
{
code: "a + ('`b` + `c`' + '`d`') + e",
output: "`${a }\\`b\\` + \\`c\\`` + `\\`d\\`${ e}`",
errors
},
{
code: "var foo = \"Hello \" + \"world \" + \"another \" + test",
output: "var foo = \"Hello \" + \"world \" + `another ${ test}`",
Expand Down

0 comments on commit 00d053c

Please sign in to comment.