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 Oct 29, 2021
1 parent 97db466 commit a596752
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/lib/rules/prefer-template.js
Expand Up @@ -227,7 +227,7 @@ ruleTester.run("prefer-template", rule, {

// https://github.com/eslint/eslint/issues/15083
{
code: "\"Hello \" + \"world \" + test",
code: "'Hello ' + 'world ' + test",
output: "`Hello world ${ test}`",
errors
},
Expand All @@ -236,6 +236,11 @@ ruleTester.run("prefer-template", rule, {
output: "var foo = `Hello world another ${ test}`",
errors
},
{
code: "'Hello ' + '\"world\" ' + test",
output: "`Hello \"world\" ${ test}`",
errors
},
{
code: "\"Hello \" + \"'world' \" + test",
output: "`Hello 'world' ${ test}`",
Expand Down

0 comments on commit a596752

Please sign in to comment.