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 00ecd38
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/lib/rules/no-unicode-codepoint-escapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ new RuleTester().run("no-unicode-codepoint-escapes", rule, {
},
{
code: "tag`\\u{45}`",
output: "tag`\\u0045`",
output: "tag`\\0045}`",
errors: [
"ES2015 Unicode code point escape sequences are forbidden.",
],
Expand All @@ -79,7 +79,7 @@ new RuleTester().run("no-unicode-codepoint-escapes", rule, {
//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 00ecd38

Please sign in to comment.