Skip to content

Commit e52512c

Browse files
2Pacalypse-brianc
authored andcommitted
Adjust the test for arrays of buffers to work across all node versions.
1 parent e44d83f commit e52512c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/utils-tests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ test('prepareValue: date array prepared properly', function() {
127127
});
128128

129129
test('prepareValue: buffer array prepared properly', function() {
130-
var buffer1 = Buffer.from('dead', 'hex');
131-
var buffer2 = Buffer.from('beef', 'hex');
130+
var buffer1 = Buffer.from ? Buffer.from('dead', 'hex') : new Buffer('dead', 'hex');
131+
var buffer2 = Buffer.from ? Buffer.from('beef', 'hex') : new Buffer('beef', 'hex');
132132
var out = utils.prepareValue([buffer1, buffer2]);
133133
assert.strictEqual(out, '{\\\\xdead,\\\\xbeef}');
134134
});

0 commit comments

Comments
 (0)