mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibJS: Implement the object literal __proto__ property key special case
This commit is contained in:
parent
9fa78b1a05
commit
7ebb421ee9
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