Skip to content

Commit fd5354f

Browse files
committed
✅ fix tests
1 parent 0b44ce2 commit fd5354f

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

test/get-static-value.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ describe("The 'getStaticValue' function", () => {
9191
code: "const obj = {b: 2}; ({a: 1, ...obj})",
9292
expected: { value: { a: 1, b: 2 } },
9393
},
94-
{
95-
code: "({'a': 1, 1e+1: 2, 2n: 3})",
96-
expected: { value: { a: 1, "10": 2, "2": 3 } },
97-
},
9894
{ code: "var obj = {b: 2}; ({a: 1, ...obj})", expected: null },
9995
{ code: "({ get a() {} })", expected: null },
10096
{ code: "({ a })", expected: null },
@@ -246,6 +242,10 @@ const aMap = Object.freeze({
246242
code: "a?.()",
247243
expected: null,
248244
},
245+
{
246+
code: "({'a': 1, 1e+1: 2, 2n: 3})",
247+
expected: { value: { a: 1, "10": 2, "2": 3 } },
248+
},
249249
]
250250
: []),
251251
...(semver.gte(eslint.Linter.version, "7.0.0")

test/reference-tracker.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -501,19 +501,23 @@ describe("The 'ReferenceTracker' class:", () => {
501501
},
502502
expected: [],
503503
},
504-
{
505-
description:
506-
"should not mix up public and private identifiers.",
507-
code: [
508-
"class C { #value; wrap() { var value = MyObj.#value; } }",
509-
].join("\n"),
510-
traceMap: {
511-
MyObj: {
512-
value: { [READ]: 1 },
513-
},
514-
},
515-
expected: [],
516-
},
504+
...(semver.gte(eslint.Linter.version, "7.0.0")
505+
? [
506+
{
507+
description:
508+
"should not mix up public and private identifiers.",
509+
code: [
510+
"class C { #value; wrap() { var value = MyObj.#value; } }",
511+
].join("\n"),
512+
traceMap: {
513+
MyObj: {
514+
value: { [READ]: 1 },
515+
},
516+
},
517+
expected: [],
518+
},
519+
]
520+
: []),
517521
]) {
518522
it(description, () => {
519523
const linter = new eslint.Linter()

0 commit comments

Comments
 (0)