diff options
Diffstat (limited to 'Libraries/LibJS/Tests/builtins/ArrayBuffer')
3 files changed, 0 insertions, 46 deletions
diff --git a/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.isView.js b/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.isView.js deleted file mode 100644 index db1be84067..0000000000 --- a/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.isView.js +++ /dev/null @@ -1,27 +0,0 @@ -// Update when more typed arrays get added -const TYPED_ARRAYS = [ - Uint8Array, - Uint16Array, - Uint32Array, - Int8Array, - Int16Array, - Int32Array, - Float32Array, - Float64Array, -]; - -test("basic functionality", () => { - expect(ArrayBuffer.isView).toHaveLength(1); - - expect(ArrayBuffer.isView()).toBeFalse(); - expect(ArrayBuffer.isView(null)).toBeFalse(); - expect(ArrayBuffer.isView(undefined)).toBeFalse(); - expect(ArrayBuffer.isView([])).toBeFalse(); - expect(ArrayBuffer.isView({})).toBeFalse(); - expect(ArrayBuffer.isView(123)).toBeFalse(); - expect(ArrayBuffer.isView("foo")).toBeFalse(); - expect(ArrayBuffer.isView(new ArrayBuffer())).toBeFalse(); - TYPED_ARRAYS.forEach(T => { - expect(ArrayBuffer.isView(new T())).toBeTrue(); - }); -}); diff --git a/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.js b/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.js deleted file mode 100644 index 8fb05a250c..0000000000 --- a/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.js +++ /dev/null @@ -1,13 +0,0 @@ -test("basic functionality", () => { - expect(ArrayBuffer).toHaveLength(1); - expect(ArrayBuffer.name).toBe("ArrayBuffer"); - expect(ArrayBuffer.prototype.constructor).toBe(ArrayBuffer); - expect(new ArrayBuffer()).toBeInstanceOf(ArrayBuffer); - expect(typeof new ArrayBuffer()).toBe("object"); -}); - -test("ArrayBuffer constructor must be invoked with 'new'", () => { - expect(() => { - ArrayBuffer(); - }).toThrowWithMessage(TypeError, "ArrayBuffer constructor must be called with 'new'"); -}); diff --git a/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.prototype.byteLength.js b/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.prototype.byteLength.js deleted file mode 100644 index 9880e597aa..0000000000 --- a/Libraries/LibJS/Tests/builtins/ArrayBuffer/ArrayBuffer.prototype.byteLength.js +++ /dev/null @@ -1,6 +0,0 @@ -test("basic functionality", () => { - expect(new ArrayBuffer().byteLength).toBe(0); - expect(new ArrayBuffer(1).byteLength).toBe(1); - expect(new ArrayBuffer(64).byteLength).toBe(64); - expect(new ArrayBuffer(123).byteLength).toBe(123); -}); |