Skip to content

Commit

Permalink
add: added test for private identifier and property access (#2989)
Browse files Browse the repository at this point in the history
* add: added test for private identifier and property access

* update: testing with updated version of esotope

* chore: updated esotope-hammerhead version to 0.6.8

---------

Co-authored-by: bayheck <[email protected]>
  • Loading branch information
Bayheck and bayheck authored Dec 22, 2023
1 parent 7b92fc6 commit 8275037
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bowser": "1.6.0",
"crypto-md5": "^1.0.0",
"debug": "4.3.1",
"esotope-hammerhead": "0.6.7",
"esotope-hammerhead": "0.6.8",
"http-cache-semantics": "^4.1.0",
"httpntlm": "^1.8.10",
"iconv-lite": "0.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ if (!browserUtils.isIOS) {

strictEqual(window.prop, 4);
});

test('private identifier and property access', function () {
var script = `const name = "name"; class s {#a = { name: 123}; output(){return this.#a[name]}}; window.prop = new s().output()`;

eval(processScript(script));

strictEqual(window.prop, 123);
});
}

if (!browserUtils.isSafari || browserUtils.version >= 16.4) {
Expand Down

0 comments on commit 8275037

Please sign in to comment.