Skip to content

Commit ca78dd5

Browse files
committed
Update jest.global-teardown.js
1 parent 99f19f6 commit ca78dd5

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

jest.global-teardown.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
const process = require('process');
2+
const mongoTeardown = require('@shelf/jest-mongodb/teardown');
3+
4+
module.exports = async () => {
5+
/**
6+
* Cleanup MongoDB Memory Server
7+
* @shelf/jest-mongodb should handle this automatically, but we try to ensure cleanup
8+
*/
9+
await mongoTeardown();
210

3-
module.exports = () => {
411
if (process.env.CI) {
512
setTimeout(() => {
613
process.exit(0);
714
}, 1000);
815
}
9-
};
16+
};

0 commit comments

Comments
 (0)