ladybird/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();
});