-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: db.close
no longer necessary
#8333
Conversation
The `close` method is no longer on the `db` and the cleanup is handled by `connection.close`
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #8333 +/- ##
=======================================
Coverage 62.17% 62.17%
=======================================
Files 266 266
Lines 10694 10694
Branches 2603 2603
=======================================
Hits 6649 6649
Misses 3459 3459
Partials 586 586 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Ref https://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#close (not actually related to mongodb-memory-server)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Ref https://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#close (not actually related to mongodb-memory-server)
db.close
no longer necessary
I updated the name of the PR. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/MongoDB.md
Outdated
@@ -115,7 +115,6 @@ beforeAll(async () => { | |||
|
|||
afterAll(async () => { | |||
await connection.close(); | |||
await db.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should keep a comment around saying if you're on version x, you need to call close
as well
/cc @vladgolubev probably relevant for you |
Thanks @rick-shar-ww! I've updated my preset at https://github.com/shelfio/jest-mongodb which is now referenced in the docs. You can commit your change again after pulling the latest |
@rick-shar-ww ping 🙂 |
@rick-shar-ww still interested in this PR? 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
(almost 3 years later 🙈)
db.close
no longer necessarydb.close
no longer necessary
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The
close
method is no longer on thedb
and the cleanup is handled byconnection.close
Summary
Test plan