Skip to content

Commit

Permalink
[Tests] fix Buffer tests to work in node < 4.5 and node < 5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Feb 15, 2019
1 parent d3a52ee commit 3c5725e
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('abc');
var buffer = Buffer.from ? Buffer.from('abc') : new Buffer('abc');
t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer');
t.end();
});

0 comments on commit 3c5725e

Please sign in to comment.