Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e39c235

Browse files
committedAug 17, 2019
[Tests] Buffer.from in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray
1 parent 7ebe4ad commit e39c235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎test/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test('isBuffer()', function (t) {
130130
var saferBuffer = SaferBuffer.from('abc');
131131
t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer');
132132

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

0 commit comments

Comments
 (0)
Please sign in to comment.