【问题标题】:How to debug on console with Hapi.js Lab test framework?如何使用 Hapi.js Lab 测试框架在控制台上进行调试?
【发布时间】:2016-07-29 00:46:08
【问题描述】:

Mocha 可以选择使用mocha debug 运行测试,就像node debug 一样,允许在REPL 控制台中进行调试。

如何使用Hapi Lab 进行REPL 调试?

【问题讨论】:

  • 可能有更好的方法,但我通常只做node debug ./node_modules/.bin/lab。你仍然可以传递任何你通常会去实验室的标志,例如-i 12 -v 或其他。
  • 我试过了,我的脚本显示了 Lab chaged,而不是像写的那样。 ://
  • 不确定你的意思。
  • 那是因为我启用了覆盖。 :)

标签: node.js testing hapijs lab


【解决方案1】:

我只需要运行node debug node_modules/.bin/lab *.js,就像@matt-harrison 说的那样。

唯一的提示是:调试时不要使用覆盖率,因为覆盖率会改变原始代码,使调试变得困难。

【讨论】:

    猜你喜欢
    • 2015-02-01
    • 1970-01-01
    • 2016-05-26
    • 1970-01-01
    • 1970-01-01
    • 2015-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多