mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
parent
b2e3389a6a
commit
0c1ab2c7f7
1 changed files with 6 additions and 8 deletions
|
@ -13,14 +13,12 @@ const assert = require('assert');
|
||||||
|
|
||||||
const SlowBuffer = require('buffer').SlowBuffer;
|
const SlowBuffer = require('buffer').SlowBuffer;
|
||||||
|
|
||||||
// TODO(bartlomieju): this test started failing after update to V8 12.0,
|
// Verify the maximum Uint8Array size.
|
||||||
// maybe the size limit was increased?
|
// (see https://github.com/tc39/ecma262/pull/3052).
|
||||||
// Verify the maximum Uint8Array size. There is no concrete limit by spec. The
|
assert.throws(
|
||||||
// internal limits should be updated if this fails.
|
() => new Uint8Array(2 ** 53),
|
||||||
// assert.throws(
|
{ message: 'Invalid typed array length: 9007199254740992' }
|
||||||
// () => new Uint8Array(2 ** 32 + 1),
|
);
|
||||||
// { message: 'Invalid typed array length: 4294967297' }
|
|
||||||
// );
|
|
||||||
|
|
||||||
const b = Buffer.allocUnsafe(1024);
|
const b = Buffer.allocUnsafe(1024);
|
||||||
assert.strictEqual(b.length, 1024);
|
assert.strictEqual(b.length, 1024);
|
||||||
|
|
Loading…
Reference in a new issue