summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js')
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js b/Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js
index 9a1043f5d4..662fd6e04e 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/Array/array-length-setter.js
@@ -34,4 +34,14 @@ describe("normal behavior", () => {
a.length = true;
expect(a).toHaveLength(1);
});
+
+ test("setting a huge array length", () => {
+ var a = [];
+ a.length = 0x80000000;
+ expect(a.length).toEqual(0x80000000);
+
+ var b = [];
+ b.length = 0x80000001;
+ expect(b.length).toEqual(0x80000001);
+ });
});