Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Re-enable alloc max size test #21059

Merged
merged 2 commits into from
Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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