assaf / node-replay

When API testing slows you down: record and replay HTTP responses like a boss
http://documentup.com/assaf/node-replay
MIT License
522 stars 107 forks source link

Prevent patching native modules multiple times #175

Closed TooManyBees closed 3 years ago

TooManyBees commented 3 years ago

Avoids memory leaks in Jest caused by monkeypatching native modules. Using the style of fix described here (https://chanind.github.io/javascript/2019/10/12/jest-tests-memory-leak.html) adds a property to indicate that DNS, HTTP, and HTTPS have already been patched.