aheckmann / gridfs-stream

Easily stream files to and from MongoDB
MIT License
615 stars 120 forks source link

How to close the connection. #148

Open select opened 4 years ago

select commented 4 years ago

Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with --detectOpenHandles to troubleshoot this issue.

When I write unit tests with jest the test does not end. I would love to close the connection like in the following example, is that possible?

const grid = require('gridfs-stream');
gfs = grid(db, mongo);
gfs.close()