2014-03-18 55 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'對我來說是什麼。老實說,這個文件是相當可怕的。這裏有很多矛盾的信息,而且這些信息顯然不起作用。 –

相關問題