Skip to content

Commit

Permalink
🐛 #12 by not resolving static value of Symbol() (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninevra committed May 14, 2021
1 parent 9a5c4fb commit 994ee18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/get-static-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const callAllowed = new Set(
String.fromCharCode,
String.fromCodePoint,
String.raw,
Symbol,
Symbol.for,
Symbol.keyFor,
unescape,
Expand Down
4 changes: 4 additions & 0 deletions test/get-static-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ describe("The 'getStaticValue' function", () => {
expected: { value: Symbol.iterator },
},
{ code: "Symbol[iterator]", expected: null },
{
code: "const symbol = Symbol(); (symbol === symbol)",
expected: null,
},
{ code: "Object.freeze", expected: { value: Object.freeze } },
{ code: "Object.xxx", expected: { value: undefined } },
{ code: "new Array(2)", expected: null },
Expand Down

0 comments on commit 994ee18

Please sign in to comment.