mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
LibJS: Add content type check to InitializeTypedArrayFromTypedArray()
Resolves a FIXME.
This commit is contained in:
parent
d7750999b3
commit
e08702a235
3 changed files with 7 additions and 2 deletions
|
@ -158,7 +158,7 @@ test("typed array from TypedArray", () => {
|
|||
BIGINT_TYPED_ARRAYS.forEach(T => {
|
||||
expect(() => {
|
||||
const newTypedArray = new T(u8Array);
|
||||
}).toThrowWithMessage(TypeError, "Cannot convert number to BigInt");
|
||||
}).toThrowWithMessage(TypeError, `Can't create ${T.name} from Uint8Array`);
|
||||
|
||||
const newBigIntTypedArray = new T(bigU64Array);
|
||||
expect(newBigIntTypedArray[0]).toBe(1n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue