Whisher
Whisher

Reputation: 32716

Hapi Lab why Test failed when all the tests are passed

Does anyone know the meaning of ?

npm ERR! 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 I get a successful green 3 tests complete (all my test are passed) but why I also see the nasty ?

npm ERR! Test failed. See above for more details.

Upvotes: 7

Views: 2675

Answers (2)

PaulAndrewLang
PaulAndrewLang

Reputation: 379

I resolved this by deleting my node_modules folder and running "npm install" again since my major versions of both node & npm had changed.

Upvotes: 1

Gergo Erdosi
Gergo Erdosi

Reputation: 42048

The test fails because lab detected a global variable leak:

The following leaks were detected:lr

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

Upvotes: 11

Related Questions