Skip to content

Commit

Permalink
[Tests] Buffer.from in node v5.0-v5.9 and v4.0-v4.4 requires a Type…
Browse files Browse the repository at this point in the history
…dArray
  • Loading branch information
ljharb committed Aug 17, 2019
1 parent 7ebe4ad commit e39c235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ test('isBuffer()', function (t) {
var saferBuffer = SaferBuffer.from('abc');
t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer');

var buffer = Buffer.from ? Buffer.from('abc') : new Buffer('abc');
var buffer = Buffer.from && Buffer.alloc ? Buffer.from('abc') : new Buffer('abc');
t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer');
t.end();
});

0 comments on commit e39c235

Please sign in to comment.