Skip to content

Commit

Permalink
✅ fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed May 14, 2021
1 parent 0b44ce2 commit fd5354f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
8 changes: 4 additions & 4 deletions test/get-static-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ describe("The 'getStaticValue' function", () => {
code: "const obj = {b: 2}; ({a: 1, ...obj})",
expected: { value: { a: 1, b: 2 } },
},
{
code: "({'a': 1, 1e+1: 2, 2n: 3})",
expected: { value: { a: 1, "10": 2, "2": 3 } },
},
{ code: "var obj = {b: 2}; ({a: 1, ...obj})", expected: null },
{ code: "({ get a() {} })", expected: null },
{ code: "({ a })", expected: null },
Expand Down Expand Up @@ -246,6 +242,10 @@ const aMap = Object.freeze({
code: "a?.()",
expected: null,
},
{
code: "({'a': 1, 1e+1: 2, 2n: 3})",
expected: { value: { a: 1, "10": 2, "2": 3 } },
},
]
: []),
...(semver.gte(eslint.Linter.version, "7.0.0")
Expand Down
30 changes: 17 additions & 13 deletions test/reference-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,19 +501,23 @@ describe("The 'ReferenceTracker' class:", () => {
},
expected: [],
},
{
description:
"should not mix up public and private identifiers.",
code: [
"class C { #value; wrap() { var value = MyObj.#value; } }",
].join("\n"),
traceMap: {
MyObj: {
value: { [READ]: 1 },
},
},
expected: [],
},
...(semver.gte(eslint.Linter.version, "7.0.0")
? [
{
description:
"should not mix up public and private identifiers.",
code: [
"class C { #value; wrap() { var value = MyObj.#value; } }",
].join("\n"),
traceMap: {
MyObj: {
value: { [READ]: 1 },
},
},
expected: [],
},
]
: []),
]) {
it(description, () => {
const linter = new eslint.Linter()
Expand Down

0 comments on commit fd5354f

Please sign in to comment.