Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test: squash line for buffer regression #649 test
  • Loading branch information
joyeecheung committed Dec 4, 2016
commit 1277c6a94a6a801c5ce22f03e1dfe898c3143095
12 changes: 4 additions & 8 deletions test/parallel/test-buffer-regression-649.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ const SlowBuffer = require('buffer').SlowBuffer;
// Regression test for https://github.com/nodejs/node/issues/649.
const len = 1422561062959;
const lenLimitMsg = /^RangeError: Invalid typed array length$/;
assert.throws(() => Buffer(len).toString('utf8'),
lenLimitMsg);
assert.throws(() => SlowBuffer(len).toString('utf8'),
lenLimitMsg);
assert.throws(() => Buffer.alloc(len).toString('utf8'),
lenLimitMsg);
assert.throws(() => Buffer.allocUnsafe(len).toString('utf8'),
lenLimitMsg);
assert.throws(() => Buffer(len).toString('utf8'), lenLimitMsg);
assert.throws(() => SlowBuffer(len).toString('utf8'), lenLimitMsg);
assert.throws(() => Buffer.alloc(len).toString('utf8'), lenLimitMsg);
assert.throws(() => Buffer.allocUnsafe(len).toString('utf8'), lenLimitMsg);
assert.throws(() => Buffer.allocUnsafeSlow(len).toString('utf8'),
lenLimitMsg);