7

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.

Gergo Erdosi
  • 40,904
  • 21
  • 118
  • 94
Whisher
  • 31,320
  • 32
  • 120
  • 201

2 Answers2

11

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).

Gergo Erdosi
  • 40,904
  • 21
  • 118
  • 94
  • 2
    A module can define it too. I don't know which modules you use, but "lr" can stand for "live reload". If `lr` is defined in a module, you can use the `-I` (`--ignore`) option of lab to ignore that variable. – Gergo Erdosi Aug 10 '15 at 22:20
1

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

PaulAndrewLang
  • 379
  • 3
  • 4