A Node.js library for writing memory leak tests using Mocha or other test runners.
Leakage is a Node.js library for detecting memory leaks in JavaScript code through automated testing. It runs your code repeatedly, captures heap snapshots, and analyzes diffs to identify memory that isn't being garbage collected. This helps developers catch and fix memory leaks before they cause performance issues or crashes in production.
Node.js developers who want to ensure their applications are free from memory leaks, particularly those building long-running services, servers, or applications where memory stability is critical.
Developers choose Leakage because it integrates directly into existing test suites (like Mocha or Tape), provides both synchronous and asynchronous testing support, and offers detailed heap diff analysis to pinpoint leaks. It's a specialized tool that turns memory leak detection from a manual debugging task into an automated, regression-preventing practice.
🐛 Memory leak testing for node.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically identifies memory leaks by analyzing heap diffs over multiple iterations, turning manual debugging into an automated test process as described in the 'Memory Leak Detection' feature.
Works directly with popular test runners like Mocha and Tape, allowing memory leak tests to be incorporated into existing test suites, as shown in the usage examples.
Provides iterate.async() for testing asynchronous operations, enabling comprehensive leak detection in modern Node.js apps, highlighted in the 'Asynchronous Tests' section.
Can write heap diff JSON to the filesystem for in-depth analysis, helping pinpoint exact memory issues, as mentioned in the CLI parameters section.
Tests are inherently slow due to multiple heap snapshots and garbage collections, which the FAQ admits can lead to timeouts and requires configuration adjustments.
Requires specific environment setups, such as installing g++ 4.8 on Travis CI, adding overhead and potential compatibility issues, as detailed in the Travis CI section.
Limited to Node.js environments and cannot be used for browser or other JavaScript runtimes, restricting its applicability for full-stack projects.