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) {
271
271
// it as `Unknown`.
272
272
serverDescription . type = 'Unknown' ;
273
273
}
274
- //serverDescription.error = serverDescription?.error?.message;
275
274
276
275
return serverDescription ;
277
276
}
@@ -475,9 +474,11 @@ function assertTopologyDescriptionOutcomeExpectations(
475
474
} else if ( expectedKey !== 'error' ) {
476
475
expect ( actualServer ) . to . have . deep . property ( expectedKey , expectedValue ) ;
477
476
} 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 ) ) ;
481
482
}
482
483
}
483
484
}
You can’t perform that action at this time.
0 commit comments