hapijs / hapijs/lab

Track leaking timers, sockets, open files, child processes, etc

Open
#988 2 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
736
Forks
177
PR merge metrics
No merged PRs in 30d

Description

#### What problem are you trying to solve?

Track any leaking open file descriptors. Currently this is done in `inert` [through a platform-specific hack](https://github.com/hapijs/inert/blob/87f85b9730b318b9a18221a08259b7f22d31a2ac/test/file.js#L1464-L1491).

#### Do you have a new or modified API suggestion to solve the problem?

Add a new option / flag, that will make the tests fail on any such leak. Both at an individual test level, and at a global level, similar to the already integrated leak detection.

Besides making the `inert` tests simpler, and platform agnostic, this feature can help expose issues in existing code and tests.

See [wtfnode](https://github.com/myndzi/wtfnode) for a way to do this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.