mfncooper / mockery

Simplifying the use of mocks with Node.js
Other
1.1k stars 60 forks source link

Fixes mfncooper/mockery #51 #57

Closed roblg closed 8 years ago

roblg commented 8 years ago

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.

davglass commented 8 years ago

This looks ok to me and all the tests pass :)

I'll make this a major version bump just to be safe..

davglass commented 8 years ago

Published in mockery@2.0.0