summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests/object-expression-__proto__.js
blob: bee5ccf99fd7311904edf42b36abb92e4afe1857 (plain)
1
2
3
4
5
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"]);
});