You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Christopher Hiller edited this page Oct 10, 2017
·
1 revision
Detecting which module is causing a global leak can be tedious. Add these lines at the very beginning of your tests, or in a file which is included via --require:
Object.defineProperty(global,"name_of_leaking_property",{set: function(value){thrownewError("Found the leak!");}});
This will print a stacktrace that shows which module caused the leak. And if it's not yours - go open a pull request! :)