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 {
1414 makeClientMetadata ,
1515 MongoClient ,
1616 MongoClientAuthProviders ,
17+ type MongoClientOptions ,
1718 MongoDBResponse ,
1819 MongoServerError ,
1920 ns ,
@@ -172,16 +173,16 @@ describe('Connection', function () {
172173 metadata : {
173174 requires : { topology : 'single' , os : '!win32' }
174175 } ,
175-
176176 test : function ( done ) {
177177 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 ) ;
185186
186187 const db = client . db ( configuration . db ) ;
187188
You can’t perform that action at this time.
0 commit comments