Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js Ember CLI代码覆盖率报告_Ember.js_Qunit_Ember Cli_Broccolijs_Testem - Fatal编程技术网

Ember.js Ember CLI代码覆盖率报告

Ember.js Ember CLI代码覆盖率报告,ember.js,qunit,ember-cli,broccolijs,testem,Ember.js,Qunit,Ember Cli,Broccolijs,Testem,我正在使用Ember CLI,并尝试将代码覆盖率报告与使用testem运行的内置Qunit测试集成在一起。我尝试使用伊斯坦布尔,但我无法让它找到要插入的文件,因为它似乎正在tmp目录中查找。我在testem.json中尝试过这样做: { "framework": "qunit", "serve_files": [ "instrumented/components/*.js" ], "before_tests": "istanbul instrument --output instrume

我正在使用Ember CLI,并尝试将代码覆盖率报告与使用testem运行的内置Qunit测试集成在一起。我尝试使用伊斯坦布尔,但我无法让它找到要插入的文件,因为它似乎正在tmp目录中查找。我在testem.json中尝试过这样做:

{
"framework": "qunit",
"serve_files": [
    "instrumented/components/*.js"
],
"before_tests": "istanbul instrument --output instrumented/components app/components",
"after_tests": "istanbul report",
"test_page": "tests/index.html",
"launch_in_ci": ["PhantomJS"],
"launch_in_dev": ["PhantomJS", "Chrome"],
"reporter": "tap"
}
但我不断地犯这样的错误: 不正常1错误 --- 信息:>

        fs.js:684
          return binding.stat(pathModule._makeLong(path));
                         ^
        Error: ENOENT, no such file or directory '/Users/Robert/ui/tmp/class-tests_dist-hqZLfsWS.tmp/app/components'
            at Object.fs.statSync (fs.js:684:18)
            at InstrumentCommand.Command.mix.run (/usr/local/lib/node_modules/istanbul/lib/command/instrument.js:230:20)
            at runCommand (/usr/local/lib/node_modules/istanbul/lib/cli.js:58:19)
            at runToCompletion (/usr/local/lib/node_modules/istanbul/lib/cli.js:62:5)
            at Object.<anonymous> (/usr/local/lib/node_modules/istanbul/lib/cli.js:67:5)
            at Module._compile (module.js:456:26)
            at Object.Module._extensions..js (module.js:474:10)
            at Module.load (module.js:356:32)
            at Function.Module._load (module.js:312:12)
            at Function.Module.runMain (module.js:497:10)
fs.js:684
返回binding.stat(pathModule._makeLong(path));
^
错误:enoint,没有这样的文件或目录“/Users/Robert/ui/tmp/class-tests\u dist-hqZLfsWS.tmp/app/components”
在Object.fs.statSync(fs.js:684:18)
在InstrumentCommand.Command.mix.run(/usr/local/lib/node_modules/伊斯坦布尔/lib/Command/instrument.js:230:20)
运行命令时(/usr/local/lib/node_modules/伊斯坦布尔/lib/cli.js:58:19)
在运行完成时(/usr/local/lib/node_modules/伊斯坦布尔/lib/cli.js:62:5)
反对。(/usr/local/lib/node_modules/伊斯坦布尔/lib/cli.js:67:5)
在模块处编译(Module.js:456:26)
在Object.Module.\u extensions..js(Module.js:474:10)
在Module.load(Module.js:356:32)
在Function.Module.\u加载(Module.js:312:12)
位于Function.Module.runMain(Module.js:497:10)
我也尝试过使用Karma,但我无法理解其配置。我也试过毛毯,但那只是给了我一个100%覆盖传输代码的虚假报告

我不完全理解传输的代码是如何工作的,我也不确定最好的方法是什么,但我绝对希望得到任何帮助,为我指明正确的方向,让我获得一份好的代码覆盖率报告


是否有人成功集成了任何类型的代码覆盖率报告?

Steven Glanzer最近发布了一个用于提供代码覆盖率的ember cli附加组件,名为ember cli blanket


您可以在

上找到它,现在有一个新的Ember插件用于伊斯坦布尔的代码覆盖。灰烬CLI毯子不再工作

您可以在此处找到新加载项:

给它一个hack path
。/../app/components
,如果这有帮助,我会将其作为答案发布。