1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:45:07 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins/Array/array-index-number-whitespace.js

7 lines
178 B
JavaScript

test("indexing the array doesn't strip whitespace if it's a number", () => {
var a = [];
a[1] = 1;
expect(a["1"]).toBe(1);
expect(a[" 1 "]).toBeUndefined();
});