0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

fix(ext/node): Re-enable alloc max size test (#21059)

Ref #21036
This commit is contained in:
Kenta Moriuchi 2023-11-11 17:23:01 +09:00 committed by Yoshiya Hinosawa
parent f155ca7a62
commit 4f8d2f3a37
No known key found for this signature in database
GPG key ID: 9017DB4559488785

View file

@ -13,14 +13,12 @@ const assert = require('assert');
const SlowBuffer = require('buffer').SlowBuffer;
// TODO(bartlomieju): this test started failing after update to V8 12.0,
// maybe the size limit was increased?
// Verify the maximum Uint8Array size. There is no concrete limit by spec. The
// internal limits should be updated if this fails.
// assert.throws(
// () => new Uint8Array(2 ** 32 + 1),
// { message: 'Invalid typed array length: 4294967297' }
// );
// Verify the maximum Uint8Array size.
// (see https://github.com/tc39/ecma262/pull/3052).
assert.throws(
() => new Uint8Array(2 ** 53),
{ message: 'Invalid typed array length: 9007199254740992' }
);
const b = Buffer.allocUnsafe(1024);
assert.strictEqual(b.length, 1024);