@@ -29,22 +29,22 @@ test('EventEmitter.once', function (t) {
29
29
30
30
test ( 'normalizing query configs' , function ( ) {
31
31
var config
32
- var callback = function ( ) { }
32
+ var callback = function ( ) { }
33
33
34
- config = utils . normalizeQueryConfig ( { text : 'TEXT' } )
35
- assert . same ( config , { text : 'TEXT' } )
34
+ config = utils . normalizeQueryConfig ( { text : 'TEXT' } )
35
+ assert . same ( config , { text : 'TEXT' } )
36
36
37
- config = utils . normalizeQueryConfig ( { text : 'TEXT' } , [ 10 ] )
38
- assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] } )
37
+ config = utils . normalizeQueryConfig ( { text : 'TEXT' } , [ 10 ] )
38
+ assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] } )
39
39
40
- config = utils . normalizeQueryConfig ( { text : 'TEXT' , values : [ 10 ] } )
41
- assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] } )
40
+ config = utils . normalizeQueryConfig ( { text : 'TEXT' , values : [ 10 ] } )
41
+ assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] } )
42
42
43
43
config = utils . normalizeQueryConfig ( 'TEXT' , [ 10 ] , callback )
44
- assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] , callback : callback } )
44
+ assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] , callback : callback } )
45
45
46
- config = utils . normalizeQueryConfig ( { text : 'TEXT' , values : [ 10 ] } , callback )
47
- assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] , callback : callback } )
46
+ config = utils . normalizeQueryConfig ( { text : 'TEXT' , values : [ 10 ] } , callback )
47
+ assert . deepEqual ( config , { text : 'TEXT' , values : [ 10 ] , callback : callback } )
48
48
} )
49
49
50
50
test ( 'prepareValues: buffer prepared properly' , function ( ) {
@@ -57,7 +57,8 @@ test('prepareValues: Uint8Array prepared properly', function () {
57
57
var buf = new Uint8Array ( [ 1 , 2 , 3 ] ) . subarray ( 1 , 2 )
58
58
var out = utils . prepareValue ( buf )
59
59
assert . ok ( Buffer . isBuffer ( out ) )
60
- assert . deepEqual ( out , [ 2 ] )
60
+ assert . equal ( out . length , 1 )
61
+ assert . deepEqual ( out [ 0 ] , 2 )
61
62
} )
62
63
63
64
test ( 'prepareValues: date prepared properly' , function ( ) {
@@ -167,12 +168,12 @@ test('prepareValue: objects with simple toPostgres prepared properly', function
167
168
assert . strictEqual ( out , 'zomgcustom!' )
168
169
} )
169
170
170
- test ( 'prepareValue: buffer array prepared properly' , function ( ) {
171
- var buffer1 = Buffer . from ( 'dead' , 'hex' )
172
- var buffer2 = Buffer . from ( 'beef' , 'hex' )
173
- var out = utils . prepareValue ( [ buffer1 , buffer2 ] )
174
- assert . strictEqual ( out , '{\\\\xdead,\\\\xbeef}' )
175
- } )
171
+ test ( 'prepareValue: buffer array prepared properly' , function ( ) {
172
+ var buffer1 = Buffer . from ( 'dead' , 'hex' )
173
+ var buffer2 = Buffer . from ( 'beef' , 'hex' )
174
+ var out = utils . prepareValue ( [ buffer1 , buffer2 ] )
175
+ assert . strictEqual ( out , '{\\\\xdead,\\\\xbeef}' )
176
+ } )
176
177
177
178
test ( 'prepareValue: objects with complex toPostgres prepared properly' , function ( ) {
178
179
var buf = Buffer . from ( 'zomgcustom!' )
0 commit comments