Skip to content

Commit e44d83f

Browse files
2Pacalypse-brianc
authored andcommitted
Add the test for arrays of buffers.
1 parent c2af53a commit e44d83f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/unit/utils-tests.js

+7
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ test('prepareValue: date array prepared properly', function() {
126126
helper.resetTimezoneOffset();
127127
});
128128

129+
test('prepareValue: buffer array prepared properly', function() {
130+
var buffer1 = Buffer.from('dead', 'hex');
131+
var buffer2 = Buffer.from('beef', 'hex');
132+
var out = utils.prepareValue([buffer1, buffer2]);
133+
assert.strictEqual(out, '{\\\\xdead,\\\\xbeef}');
134+
});
135+
129136
test('prepareValue: arbitrary objects prepared properly', function() {
130137
var out = utils.prepareValue({ x: 42 });
131138
assert.strictEqual(out, '{"x":42}');

0 commit comments

Comments
 (0)