有谁知道是什么意思?
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.
我运行了我得到的 3 个测试
一个成功的绿色 3 测试完成
(我所有的测试都通过了)
但为什么我也看到讨厌的?
npm ERR! Test failed. See above for more details.
最佳答案
测试失败,因为 lab
检测到全局变量泄漏:
The following leaks were detected:lr
这意味着您可能定义了
lr
在某个地方作为全局变量。试着找到你在哪里做的,并使变量本地化。另一个选项是运行 lab
与 -l
禁用全局变量泄漏检测的选项(虽然不推荐)。
关于hapijs - Hapi Lab 为什么当所有测试都通过时测试失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31790540/