Hapi Lab, why the test failed when all the tests passed

Does anyone know the meaning?

npm ERR! The test failed. See above for more details.

3 tests complete Test duration: 873 ms The following leaks were detected:lr npm ERR! Test failed. See above for more details. 

I run my 3 tests, which I get successful green 3 tests are completed (all my tests passed) but why am I also seeing unpleasant?

npm ERR! The test failed. See above for more details.

+4
source share
2 answers

The test failed because lab detected a global variable leak:

The following leaks were detected: lr

This means that you probably defined the variable lr somewhere as global. Try to find where you did this, and make the variable local. Another option is to run lab with the -l option, which disables global variable leak detection (this is not recommended).

+6
source

I solved this by deleting the node_modules folder and running "npm install" again, as my major versions of both node and npm have changed.

0
source

All Articles