Skip to content

Commit 3987c00

Browse files
clemclxnbbeeken
andauthored
fix(NODE-5106): Improve promises close in test
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
1 parent d87fc74 commit 3987c00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/integration/mongo_client.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('MongoClient', () => {
3131

3232
afterEach(async function () {
3333
/** Close as many times as connect calls in the runned test (tracked by clientConnectCounter) */
34-
const clientClosePromises = [...new Array(clientConnectCounter)].map(() => client.close());
34+
const clientClosePromises = Array.from({ length: clientConnectCounter }, () => client.close());
3535
await Promise.all(clientClosePromises);
3636
});
3737

0 commit comments

Comments
 (0)