After many hours of debugging I finally found that the problems of my leaked handlers in tests where caused by this module. Seems that the Store.close method actually doesn't really closes the db connection and this is a problem as it cause leaks.
I have try to find a solution but seems nedb doesn't prvide a direct api to close the database. But I found this open PR that may resolve the problem
https://github.com/elektron-technology/nedb
After many hours of debugging I finally found that the problems of my leaked handlers in tests where caused by this module. Seems that the Store.close method actually doesn't really closes the db connection and this is a problem as it cause leaks.
I have try to find a solution but seems nedb doesn't prvide a direct api to close the database. But I found this open PR that may resolve the problem
https://github.com/elektron-technology/nedb