From 5e3fc3cc5c7e19ec10cfedc621606b0751d89329 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Tue, 3 Nov 2020 12:54:46 -0500 Subject: [PATCH] nullish check --- test/functional/mongo_client_options.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/mongo_client_options.test.js b/test/functional/mongo_client_options.test.js index f1f1b166964..9eb5ff59a68 100644 --- a/test/functional/mongo_client_options.test.js +++ b/test/functional/mongo_client_options.test.js @@ -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);