mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibJS: Implement the object literal __proto__ property key special case
This commit is contained in:
parent
9fa78b1a05
commit
7ebb421ee9
Notes:
sideshowbarker
2024-07-17 17:53:48 +09:00
Author: https://github.com/IdanHo
Commit: 7ebb421ee9
Pull-request: https://github.com/SerenityOS/serenity/pull/12897
Issue: https://github.com/SerenityOS/serenity/issues/12896
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/linusg ✅
4 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
|||
test("__proto__ property", () => {
|
||||
expect(Object.getPrototypeOf({ __proto__: null })).toBeNull();
|
||||
expect(Object.getPrototypeOf({ __proto__: Array.prototype })).toEqual(Array.prototype);
|
||||
expect(Object.getPrototypeOf({ "__proto__": Array.prototype })).toEqual(Array.prototype); // prettier-ignore
|
||||
expect(Object.getOwnPropertyNames({ __proto__: Array.prototype, test: 1 })).toEqual(["test"]);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue