Javascript 茶匙+;摩卡咖啡&x2B;伊斯坦布尔报道

Javascript 茶匙+;摩卡咖啡&x2B;伊斯坦布尔报道,javascript,ruby-on-rails,node.js,teaspoon,Javascript,Ruby On Rails,Node.js,Teaspoon,Teaspoon正在使用:localhost:3000/茶匙/默认值显示我对摩卡的测试 我读到我可以用伊斯坦布尔和茶匙来做代码覆盖率报告 我安装了npm伊斯坦布尔,但我不知道如何用茶匙运行它 我想用localhost:3000/coverage或localhost:3000/teaspoon/default/coverage达到我的覆盖范围 配置是什么? 我在茶匙中尝试了默认设置,但不起作用: Teaspoon.setup do |config| # Coverage (requires i

Teaspoon正在使用:localhost:3000/茶匙/默认值显示我对摩卡的测试

我读到我可以用伊斯坦布尔和茶匙来做代码覆盖率报告

我安装了npm伊斯坦布尔,但我不知道如何用茶匙运行它

我想用localhost:3000/coverage或localhost:3000/teaspoon/default/coverage达到我的覆盖范围

配置是什么? 我在茶匙中尝试了默认设置,但不起作用:

Teaspoon.setup do |config|
  # Coverage (requires istanbul -- https://github.com/gotwarlost/istanbul)
  config.coverage                      = true
  config.coverage_reports = ['text', 'html', 'cobertura']
  config.coverage_output_dir           = "coverage"
  config.statements_coverage_threshold = 50
  config.functions_coverage_threshold  = 50
  config.branches_coverage_threshold   = 50
  config.lines_coverage_threshold      = 50
end

此配置适用于我:

Teaspoon.configure do |config|
  config.mount_at = "/teaspoon"

  config.suite do |suite|
    suite.use_framework :mocha
    suite.javascripts += ["support/expect"]
  end

  config.formatters = ["tap"]
  config.color = true
  config.use_coverage = :default

  config.coverage do |coverage|
    coverage.reports = ["html", "cobertura"]
    coverage.output_path = "coverage"
  end
end

根据您的配置,到达覆盖范围的url是什么?@FedericoBucchi不要引用我的话,但我认为这将在config.root+“/coverage”生成一个包含该信息的HTML文件。