Adjust the test for arrays of buffers to work across all node versions.

This commit is contained in:
2Pacalypse- 2017-06-12 22:12:06 +02:00 committed by Brian C
parent e44d83f02f
commit e52512cedb

View File

@ -127,8 +127,8 @@ test('prepareValue: date array prepared properly', function() {
}); });
test('prepareValue: buffer array prepared properly', function() { test('prepareValue: buffer array prepared properly', function() {
var buffer1 = Buffer.from('dead', 'hex'); var buffer1 = Buffer.from ? Buffer.from('dead', 'hex') : new Buffer('dead', 'hex');
var buffer2 = Buffer.from('beef', 'hex'); var buffer2 = Buffer.from ? Buffer.from('beef', 'hex') : new Buffer('beef', 'hex');
var out = utils.prepareValue([buffer1, buffer2]); var out = utils.prepareValue([buffer1, buffer2]);
assert.strictEqual(out, '{\\\\xdead,\\\\xbeef}'); assert.strictEqual(out, '{\\\\xdead,\\\\xbeef}');
}); });