mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 09:18:52 +00:00
LibJS: Add tests for issue #3382
This commit is contained in:
parent
b27d90db1f
commit
55c4866370
Notes:
sideshowbarker
2024-07-19 02:56:11 +09:00
Author: https://github.com/linusg
Commit: 55c4866370
Pull-request: https://github.com/SerenityOS/serenity/pull/3383
Reviewed-by: https://github.com/awesomekling
1 changed files with 15 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
describe("Issue #3382", () => {
|
||||
test("Creating an array with simple storage (<= 200 initial elements)", () => {
|
||||
var a = Array(200);
|
||||
expect(a).toHaveLength(200);
|
||||
expect(a.push("foo")).toBe(201);
|
||||
expect(a).toHaveLength(201);
|
||||
});
|
||||
|
||||
test("Creating an array with generic storage (> 200 initial elements)", () => {
|
||||
var a = Array(201);
|
||||
expect(a).toHaveLength(201);
|
||||
expect(a.push("foo")).toBe(202);
|
||||
expect(a).toHaveLength(202);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue