mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Adjust the test for arrays of buffers to work across all node versions.
This commit is contained in:
parent
e44d83f02f
commit
e52512cedb
@ -127,8 +127,8 @@ test('prepareValue: date array prepared properly', function() {
|
||||
});
|
||||
|
||||
test('prepareValue: buffer array prepared properly', function() {
|
||||
var buffer1 = Buffer.from('dead', 'hex');
|
||||
var buffer2 = Buffer.from('beef', 'hex');
|
||||
var buffer1 = Buffer.from ? Buffer.from('dead', 'hex') : new Buffer('dead', 'hex');
|
||||
var buffer2 = Buffer.from ? Buffer.from('beef', 'hex') : new Buffer('beef', 'hex');
|
||||
var out = utils.prepareValue([buffer1, buffer2]);
|
||||
assert.strictEqual(out, '{\\\\xdead,\\\\xbeef}');
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user