mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibJS: Remove String.prototype.length
A string's length property is supposed to be a regular non-writable, non-enumerable, non-configurable property on the StringObject instead.
This commit is contained in:
parent
fc2673d111
commit
8d7ec28924
5 changed files with 11 additions and 12 deletions
|
@ -62,6 +62,7 @@ describe("normal behavior", () => {
|
|||
});
|
||||
|
||||
test("native getter function", () => {
|
||||
expect(Reflect.get(String.prototype, "length", "foo")).toBe(3);
|
||||
const typedArray = new Uint8Array(3);
|
||||
expect(Reflect.get(Uint8Array.prototype, "length", typedArray)).toBe(3);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue