Skip to content

Commit

Permalink
nullish check
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Nov 3, 2020
1 parent 1a71792 commit 5e3fc3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/functional/mongo_client_options.test.js
Expand Up @@ -100,7 +100,10 @@ describe('MongoClient Options', function() {
const client = this.configuration.newClient();
client.connect(() => {
expect(client.s.options.socketTimeoutMS).to.deep.equal(0);
for (const connection of client.topology.s.coreTopology.connections()) {
const connections = client.topology.s.coreTopology
? client.topology.s.coreTopology.connections()
: [];
for (const connection of connections) {
expect(connection.socketTimeout).to.deep.equal(0);
}
client.close(done);
Expand Down

0 comments on commit 5e3fc3c

Please sign in to comment.