如何在将 dalekjs 与 grunt 一起使用时配置报告选项



i have configure followung Gruntmodule for DalekJS:

module.exports = {
  dalek: {
    options: {
      browser: ['phantomjs'],
      reporter: ['html', 'junit', 'json'],--> I also tried without this line
      dalekfile: true
    },
    files: {
      src: ['tests/gui/dalekjs/dakektest.js']
    }
  }
};

我在与配置的模块相同的文件夹中有一个 Dalekfile(我有一个拆分的 gruntfile!见http://www.html5rocks.com/en/tutorials/tooling/supercharging-your-gruntfile/?redirect_from_locale=de):Dalekfile.json:

{
  "reporter": ["console", "junit", "html", "json"],--> I also tried without this line
  "html-reporter": {
    "dest": "C:/my/path/tests/gui/dalekjs/report"
  },
  "junit-reporter": {
    "dest": "C:/my/path/tests/gui/dalekjs/report/report.xml"
  },
  "json-reporter": {
    "dest": "C:/my/path/tests/gui/dalekjs/report/report.json"
  }
}

执行grunt后,我的测试成功执行。

但是,如果我检查自定义路径,则没有报告。它在 Gruntfile 的同一文件夹中创建报告.js因此 --> gruntfilefolder/report/dalek/

当使用dalek dalektest在控制台上执行Dalektest时.js报告创建成功。 --> 我按照 dalek 文档中的说明安装了报告插件!

有没有人可以告诉我,为什么不使用自定义路径?

版本:咕噜咕噜 v0.1.13咕噜咕噜 v0.4.4咕噜咕噜-达莱克 0.2.0

干杯伊佐坎。

在谷歌群组讨论中解决:使用 dalekjs 和 grunt 时如何配置报告选项?

最新更新