@@ -25,6 +25,7 @@ var compare = function (actual, expected, type) {
25
25
assert . equal ( actual . password , expected . password , type + ' password' )
26
26
assert . equal ( actual . binary , expected . binary , type + ' binary' )
27
27
assert . equal ( actual . statement_timeout , expected . statement_timeout , type + ' statement_timeout' )
28
+ assert . equal ( actual . options , expected . options , type + ' options' )
28
29
assert . equal (
29
30
actual . idle_in_transaction_session_timeout ,
30
31
expected . idle_in_transaction_session_timeout ,
@@ -48,12 +49,14 @@ test('ConnectionParameters initializing from defaults with connectionString set'
48
49
binary : defaults . binary ,
49
50
statement_timeout : false ,
50
51
idle_in_transaction_session_timeout : false ,
52
+ options : '-c geqo=off' ,
51
53
}
52
54
53
55
var original_value = defaults . connectionString
54
56
// Just changing this here doesn't actually work because it's no longer in scope when viewed inside of
55
57
// of ConnectionParameters() so we have to pass in the defaults explicitly to test it
56
- defaults . connectionString = 'postgres://brians-are-the-best:[email protected] :7777/scoobysnacks'
58
+ defaults . connectionString =
59
+ 'postgres://brians-are-the-best:[email protected] :7777/scoobysnacks?options=-c geqo=off'
57
60
var subject = new ConnectionParameters ( defaults )
58
61
defaults . connectionString = original_value
59
62
compare ( subject , config , 'defaults-connectionString' )
@@ -73,6 +76,7 @@ test('ConnectionParameters initializing from config', function () {
73
76
} ,
74
77
statement_timeout : 15000 ,
75
78
idle_in_transaction_session_timeout : 15000 ,
79
+ options : '-c geqo=off' ,
76
80
}
77
81
var subject = new ConnectionParameters ( config )
78
82
compare ( subject , config , 'config' )
0 commit comments