For each mock in the hookedLoader cache, on disable
or reset, remove it from its parent's children list.
This gets rid of the leak in our test suite, which is relatively larges (1100 specs, each one attempting to use a clean mockery cache). I'm by no means an expert on the node module API though, so it's possible that I did something dumb here.
This fixes #51.
For each mock in the hookedLoader cache, on disable or reset, remove it from its parent's children list.
This gets rid of the leak in our test suite, which is relatively larges (1100 specs, each one attempting to use a clean mockery cache). I'm by no means an expert on the node module API though, so it's possible that I did something dumb here.