Skip to content

Commit 1488fd7

Browse files
committed
test(MongoBinaryDownload): wait until server is fully closed
Before next test
1 parent 9e9f0d0 commit 1488fd7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownload.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,9 @@ describe('MongoBinaryDownload', () => {
455455
await utils.removeDir(tmpdir);
456456

457457
if (server) {
458-
server.close();
458+
await new Promise((res) => {
459+
server.close(res);
460+
});
459461
}
460462

461463
jest.restoreAllMocks();

0 commit comments

Comments
 (0)