-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
G. Grau
committed
Feb 26, 2016
1 parent
868f825
commit c66a50b
Showing
11 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/tools | ||
/test | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- "stable" | ||
after_success: | ||
- 'cat ./coverage/lcov.info | ./node_modules/.bin/coveralls' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
if (!process.env.TEST_COV) { | ||
return; | ||
} | ||
console.log("Configuring coffee-coverage..."); | ||
|
||
var path = require('path'); | ||
var coffeeCoverage = require('coffee-coverage'); | ||
var projectRoot = path.resolve(__dirname, ".."); | ||
var coverageVar = coffeeCoverage.findIstanbulVariable(); | ||
// Only write a coverage report if we're not running inside of Istanbul. | ||
var covFileName = process.env.NODE_ENV === 'production' | ||
? "coverage-coffee-prod.json" | ||
: "coverage-coffee-dev.json" | ||
var writeOnExit = (coverageVar == null) ? (projectRoot + '/coverage/' + covFileName) : null; | ||
|
||
coffeeCoverage.register({ | ||
instrumentor: 'istanbul', | ||
basePath: projectRoot, | ||
exclude: ['/test', '/node_modules', '/.git', '/tools'], | ||
coverageVar: coverageVar, | ||
writeOnExit: writeOnExit, | ||
initAll: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
istanbul = require 'istanbul' | ||
collector = new istanbul.Collector() | ||
reporter = new istanbul.Reporter() | ||
SYNC = false | ||
|
||
_addToCollector = (filePath) -> | ||
collector.add JSON.parse fs.readFileSync(filePath, 'utf8') | ||
|
||
collector.add require '../coverage/coverage-coffee-dev.json' | ||
collector.add require '../coverage/coverage-coffee-prod.json' | ||
|
||
reporter.add 'text' | ||
reporter.add 'lcov' | ||
|
||
reporter.write collector, SYNC, -> | ||
console.log "All reports generated" |