File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export class TestConfiguration {
83
83
auth ?: { username : string ; password : string ; authSource ?: string } ;
84
84
proxyURIParams ?: ProxyParams ;
85
85
} ;
86
- serverApi : ServerApi ;
86
+ serverApi ? : ServerApi ;
87
87
activeResources : number ;
88
88
isSrv : boolean ;
89
89
serverlessCredentials : { username : string | undefined ; password : string | undefined } ;
@@ -176,7 +176,7 @@ export class TestConfiguration {
176
176
* Returns a `hello`, executed against `uri`.
177
177
*/
178
178
async hello ( uri = this . uri ) {
179
- const client = new MongoClient ( uri ) ;
179
+ const client = this . newClient ( uri ) ;
180
180
try {
181
181
await client . connect ( ) ;
182
182
const { maxBsonObjectSize, maxMessageSizeBytes, maxWriteBatchSize, ...rest } = await client
@@ -199,7 +199,7 @@ export class TestConfiguration {
199
199
}
200
200
201
201
newClient ( urlOrQueryOptions ?: string | Record < string , any > , serverOptions ?: MongoClientOptions ) {
202
- serverOptions = Object . assign ( { } , getEnvironmentalOptions ( ) , serverOptions ) ;
202
+ serverOptions = Object . assign ( < MongoClientOptions > { } , getEnvironmentalOptions ( ) , serverOptions ) ;
203
203
204
204
// Support MongoClient constructor form (url, options) for `newClient`.
205
205
if ( typeof urlOrQueryOptions === 'string' ) {
You can’t perform that action at this time.
0 commit comments