Closed Branchverse closed 2 years ago
After digging into this a bit, it looks like we already have a fix in place, the .asPromise()
chained onto mongoose.createConnection()
in the create providers method. Once I added this locally (going into node_modules
) everything closed out as expected.
@kamilmysliwiec do you think we could get a patch pushed up soon?
Just published 9.0.2
Is there an existing issue for this?
Current behavior
Running the same tests after upgrading causes the tests to not run through and provide a warning of open handles recommending the --detectOpenHandles option for the tests. This option also does not show anything, it just surpresses the warning.
The issue seems to come through ConfigServices since the updated mongoose without it works!
The tests don't run through and you have to manually stop them
Minimum reproduction code
https://github.com/Branchverse/Mongoose-version-issue
Steps to reproduce
Go to https://github.com/Branchverse/Mongoose-version-issue
Clone the repository
Follow the README.md
Expected behavior
Run the tests and not have any openHandles, or have --detectOpenHandles test option atleast show me where the open handle is
Package version
9.0.1
mongoose version
6.1.2
NestJS version
8.0.0
Node.js version
16.13
In which operating systems have you tested?
Other
No response