Add the test for arrays of buffers.

This commit is contained in:
2Pacalypse- 2017-06-10 17:08:10 +02:00 committed by Brian C
parent c2af53a24e
commit e44d83f02f

View File

@ -126,6 +126,13 @@ test('prepareValue: date array prepared properly', function() {
helper.resetTimezoneOffset();
});
test('prepareValue: buffer array prepared properly', function() {
var buffer1 = Buffer.from('dead', 'hex');
var buffer2 = Buffer.from('beef', 'hex');
var out = utils.prepareValue([buffer1, buffer2]);
assert.strictEqual(out, '{\\\\xdead,\\\\xbeef}');
});
test('prepareValue: arbitrary objects prepared properly', function() {
var out = utils.prepareValue({ x: 42 });
assert.strictEqual(out, '{"x":42}');