diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/object-expression-__proto__.js')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/object-expression-__proto__.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/object-expression-__proto__.js b/Userland/Libraries/LibJS/Tests/object-expression-__proto__.js new file mode 100644 index 0000000000..bee5ccf99f --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/object-expression-__proto__.js @@ -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"]); +}); |