Skip to content

Commit

Permalink
fix(ext/node): Re-enable alloc max size test (denoland#21059)
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Nov 11, 2023
1 parent b2e3389 commit 0c1ab2c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cli/tests/node_compat/test/parallel/test-buffer-alloc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0c1ab2c

Please sign in to comment.