mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:57:35 +00:00
LibJS: Implement missing checks for SharedArrayBuffer values
This commit is contained in:
parent
299c86db20
commit
526a74f2f1
6 changed files with 46 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
|||
describe("errors", () => {
|
||||
test("called on SharedArrayBuffer object", () => {
|
||||
expect(() => {
|
||||
ArrayBuffer.prototype.slice.call(new SharedArrayBuffer());
|
||||
}).toThrowWithMessage(TypeError, "The array buffer object cannot be a SharedArrayBuffer");
|
||||
});
|
||||
});
|
||||
|
||||
test("single parameter", () => {
|
||||
const buffer = new ArrayBuffer(16);
|
||||
const fullView = new Int32Array(buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue