【问题标题】:Specifying the location of mocha.opts when running mocha with nyc?使用 nyc 运行 mocha 时指定 mocha.opts 的位置?
【发布时间】:2018-03-26 18:37:28
【问题描述】:

是否可以在运行nyc mocha时指定mocha.opts的位置?我想把它放在根项目文件夹中。我在我的 npm 脚本中试过这个:

"scripts": {
  "test": "nyc mocha --config ./mocha.opts"
},

那没有用。我确实得到了一个适用于here 描述的设置的测试用例,但是mocha.optstest 目录中。

【问题讨论】:

    标签: javascript typescript mocha.js istanbul nyc


    【解决方案1】:
    mocha --opts <path_to_opts_file>
    

    【讨论】:

      猜你喜欢
      • 2016-10-31
      • 2022-11-01
      • 1970-01-01
      • 2014-10-24
      • 1970-01-01
      • 2020-10-05
      • 1970-01-01
      • 1970-01-01
      • 2020-08-15
      相关资源
      最近更新 更多