File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
test/integration/connection-monitoring-and-pooling Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
14
14
makeClientMetadata ,
15
15
MongoClient ,
16
16
MongoClientAuthProviders ,
17
+ type MongoClientOptions ,
17
18
MongoDBResponse ,
18
19
MongoServerError ,
19
20
ns ,
@@ -172,16 +173,16 @@ describe('Connection', function () {
172
173
metadata : {
173
174
requires : { topology : 'single' , os : '!win32' }
174
175
} ,
175
-
176
176
test : function ( done ) {
177
177
const configuration = this . configuration ;
178
- client = configuration . newClient (
179
- `mongodb://${ encodeURIComponent ( '/tmp/mongodb-27017.sock' ) } ?w=1` ,
180
- {
181
- maxPoolSize : 1 ,
182
- auth : { ...this . configuration . options . auth }
183
- }
184
- ) ;
178
+ const uri = `mongodb://${ encodeURIComponent ( '/tmp/mongodb-27017.sock' ) } ?w=1` ;
179
+ const options : MongoClientOptions = {
180
+ maxPoolSize : 1
181
+ } ;
182
+ if ( this . configuration . options . auth ) {
183
+ options . auth = this . configuration . options . auth ;
184
+ }
185
+ client = configuration . newClient ( uri , options ) ;
185
186
186
187
const db = client . db ( configuration . db ) ;
187
188
You can’t perform that action at this time.
0 commit comments