Skip to content

Commit 5e3fc3c

Browse files
committed
nullish check
1 parent 1a71792 commit 5e3fc3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/functional/mongo_client_options.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ describe('MongoClient Options', function() {
100100
const client = this.configuration.newClient();
101101
client.connect(() => {
102102
expect(client.s.options.socketTimeoutMS).to.deep.equal(0);
103-
for (const connection of client.topology.s.coreTopology.connections()) {
103+
const connections = client.topology.s.coreTopology
104+
? client.topology.s.coreTopology.connections()
105+
: [];
106+
for (const connection of connections) {
104107
expect(connection.socketTimeout).to.deep.equal(0);
105108
}
106109
client.close(done);

0 commit comments

Comments
 (0)