File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,6 @@ function normalizeServerDescription(serverDescription) {
271271 // it as `Unknown`.
272272 serverDescription . type = 'Unknown' ;
273273 }
274- //serverDescription.error = serverDescription?.error?.message;
275274
276275 return serverDescription ;
277276}
@@ -475,9 +474,11 @@ function assertTopologyDescriptionOutcomeExpectations(
475474 } else if ( expectedKey !== 'error' ) {
476475 expect ( actualServer ) . to . have . deep . property ( expectedKey , expectedValue ) ;
477476 } else {
478- // pull the message off the error if it is present
479- expect ( actualServer ) . to . have . property ( expectedKey ) . instanceof ( MongoError ) ;
480- expect ( actualServer ) . property ( expectedKey ) . property ( 'message' ) . includes ( expectedValue ) ;
477+ expect ( typeof expectedValue ) . to . equal ( 'string' ) ;
478+ expect ( actualServer )
479+ . to . have . property ( expectedKey )
480+ . instanceof ( MongoError )
481+ . to . match ( new RegExp ( expectedValue as string ) ) ;
481482 }
482483 }
483484 }
You can’t perform that action at this time.
0 commit comments