2014-03-18 50 views
6

我有问题让工作服工作。我创建了一个简单的项目here工作服github集成(与qunit,伊斯坦布尔,咕噜声)

它似乎是正确输出报告,但我肯定错过了某个步骤,因为工作服不会看到我设置。 没有分支机构出现,它只是给出了如何设置的说明。 我试图复制qunit正在做的事情,因为他们显然有它的工作。

这是我到目前为止所做的。

创建使用node/grunt/qunit以及工作服账户并切换项目的项目。 然后,我已用替换devDependencies部分中的qunit参考。

"grunt-coveralls": "0.3.0", 
"grunt-qunit-istanbul": "^0.4.0" 

我已将此添加到我的package.json

"scripts": { 
    "ci": "grunt && grunt coveralls" 
} 

我已经在我的Gruntfile.js增加这个配置对于​​qunit

options: { 
    timeout: 30000, 
    "--web-security": "no", 
    coverage: { 
     src: [ "src/<%= pkg.name %>.js" ], 
     instrumentedFiles: "temp/", 
     coberturaReport: "report/", 
     htmlReport: "build/report/coverage", 
     lcovReport: "build/report/lcov", 
     linesThresholdPct: 70 
    } 
}, 

然后我将其添加到我的.travis.yml

language: node_js 

node_js: 
    - "0.10" 
before_install: 
    npm install -g grunt-cli 
install: 
    npm install 
before_script: 
    grunt 
after_script: 
    npm run-script coveralls 

回答

4

我得到它的工作,检查回购的例子https://github.com/thorst/Code-Coverage-Qunit

虽然它并不总是可能的,我发现茉莉是多种方式更容易。我在这里有一个完整的例子:https://github.com/thorst/Code-Coverage-Jasmine

我仍然没有得到摩卡工作,虽然。这(破)回购是在这里:https://github.com/thorst/Code-Coverage-Mocha

+0

你有什么改变,以得到这个工作?你是否需要在'script:'下添加'grunt coveralls'? –

+0

这是其中一个变化,说实话有很多东西我试图我不知道我有什么,以及我改变了什么。但它现在正在工作。我甚至在windows上有本地调试补丁 –

+0

在'script:'下添加'grunt coveralls'对我来说是什么。老实说,这个文件是相当可怕的。这里有很多矛盾的信息,而且这些信息显然不起作用。 –

相关问题