Skip to content

Commit be8166e

Browse files
committed
test: Disconnect mongoose and shutdown mongod after all tests
1 parent 0b1c980 commit be8166e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/__mocks__/mongooseCommon.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ mongoServer.getConnectionString().then(mongoUri => {
2525
});
2626
});
2727

28+
afterAll(() => {
29+
mongoose.disconnect();
30+
mongoServer.stop();
31+
});
32+
2833
export { mongoose, Schema };

0 commit comments

Comments
 (0)