1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibJS: Add TypedArray.BYTES_PER_ELEMENT

This commit is contained in:
Linus Groh 2020-12-02 09:58:48 +00:00 committed by Andreas Kling
parent bb6bc70c5b
commit ddaab598a7
3 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,8 @@
test("basic functionality", () => {
expect(Uint8Array.BYTES_PER_ELEMENT).toBe(1);
expect(Uint16Array.BYTES_PER_ELEMENT).toBe(2);
expect(Uint32Array.BYTES_PER_ELEMENT).toBe(4);
expect(Int8Array.BYTES_PER_ELEMENT).toBe(1);
expect(Int16Array.BYTES_PER_ELEMENT).toBe(2);
expect(Int32Array.BYTES_PER_ELEMENT).toBe(4);
});