
This is a manual but clean revert of all commits from #12595. Adding a partial implementation of the resizable ArrayBuffer proposal without implementing all the updates to TypedArray infrastructure that is also covered by the spec introduced a bunch of crashes, so we decided to revert it for now until a full implementation is completed.
13 lines
513 B
JavaScript
13 lines
513 B
JavaScript
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'");
|
|
});
|