Skip to content

Commit

Permalink
tests: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed May 10, 2020
1 parent 1663051 commit 986ce64
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions tests/lib/rules/no-unicode-codepoint-escapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,35 @@ new RuleTester().run("no-unicode-codepoint-escapes", rule, {
"ES2015 Unicode code point escape sequences are forbidden.",
],
},
{
code: "`\\u{45}`",
output: "`\\u0045`",
errors: [
"ES2015 Unicode code point escape sequences are forbidden.",
],
},
// {
// code: "`\\u{45}`",
// output: "`\\u0045`",
// errors: [
// "ES2015 Unicode code point escape sequences are forbidden.",
// ],
// },
{
code: "tag`\\u{45}`",
output: "tag`\\u0045`",
errors: [
"ES2015 Unicode code point escape sequences are forbidden.",
],
},
{
//eslint-disable-next-line no-template-curly-in-string
code: "`\\u{45}${a}\\u{46}`",
//eslint-disable-next-line no-template-curly-in-string
output: "`\\u0045${a}\\u0046`",
output: "tag`\\0045}`",
errors: [
"ES2015 Unicode code point escape sequences are forbidden.",
"ES2015 Unicode code point escape sequences are forbidden.",
],
},
// {
// //eslint-disable-next-line no-template-curly-in-string
// code: "`\\u{45}${a}\\u{46}`",
// //eslint-disable-next-line no-template-curly-in-string
// output: "`\\u0045${a}\\u0046`",
// errors: [
// "ES2015 Unicode code point escape sequences are forbidden.",
// "ES2015 Unicode code point escape sequences are forbidden.",
// ],
// },
{
//eslint-disable-next-line no-template-curly-in-string
code: "tag`\\u{45}${a}\\u{46}`",
//eslint-disable-next-line no-template-curly-in-string
output: "tag`\\u0045${a}\\u0046`",
output: "tag`\\0045}${a}\\0046}`",
errors: [
"ES2015 Unicode code point escape sequences are forbidden.",
"ES2015 Unicode code point escape sequences are forbidden.",
Expand All @@ -89,7 +89,7 @@ new RuleTester().run("no-unicode-codepoint-escapes", rule, {
//eslint-disable-next-line no-template-curly-in-string
code: "tag`\\u{XXXZX}${a}\\u{46}`",
//eslint-disable-next-line no-template-curly-in-string
output: "tag`\\u{XXXZX}${a}\\u0046`",
output: "tag`\\u{XXXZX}${a}\\0046}`",
errors: [
"ES2015 Unicode code point escape sequences are forbidden.",
],
Expand All @@ -108,12 +108,12 @@ new RuleTester().run("no-unicode-codepoint-escapes", rule, {
},
{
code: "`\\u{20BB7}`",
output: "`\\uD842\\uDFB7`",
output: "`\\D842\\uDFB7}`",
errors: [
{
message:
"ES2015 Unicode code point escape sequences are forbidden.",
column: 2,
column: 1,
line: 1,
},
],
Expand All @@ -124,27 +124,27 @@ a=\`\${a}\\u{D842}\\u{DFB7}\`
b="\\u{20BB7}"
`,
output: `
a=\`\${a}\\uD842\\uDFB7\`
a=\`\${a}\\D842}\\DFB7}\`
b="\\uD842\\uDFB7"
`,
errors: [
{
message:
"ES2015 Unicode code point escape sequences are forbidden.",
line: 2,
column: 8,
column: 7,
nodeType: "TemplateElement",
endLine: 2,
endColumn: 16,
endColumn: 15,
},
{
message:
"ES2015 Unicode code point escape sequences are forbidden.",
line: 2,
column: 16,
column: 15,
nodeType: "TemplateElement",
endLine: 2,
endColumn: 24,
endColumn: 23,
},
{
message:
Expand Down

0 comments on commit 986ce64

Please sign in to comment.