$ npm run -s report
COVERAGE "c:\\Users\\seb\\Documents\\GitHub\\cbas\\test\\foo.js" [[19,39],[42,47],[42,47]]
COVERED "c:\\Users\\seb\\Documents\\GitHub\\cbas\\test\\foo.js" 2
COVERED "c:\\Users\\seb\\Documents\\GitHub\\cbas\\test\\foo.js" 1
COVERED "c:\\Users\\seb\\Documents\\GitHub\\cbas\\test\\foo.js" 0
Last active
August 29, 2015 14:22
-
-
Save sebdeckers/7e0bda3f8101b503465e to your computer and use it in GitHub Desktop.
Codecov / Coverify Example
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
function bar() { | |
return 'hello world' | |
} | |
bar() // comment out to drop coverage | |
// extras: transpiled code issue with coverify | |
// require('./template.jade')() // ok -- coverify reports invalid range because it covers the non-sourcemapped jadeify output | |
// require('./template.jade') // fail -- coverify tries to look up the range in original .jade source file and explodes |
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
{ | |
"name": "example-coverify", | |
"version": "1.0.0", | |
"description": "Playing around with coverify", | |
"main": "foo.js", | |
"scripts": { | |
"browserify": "browserify . -t jadeify -t coverify", | |
"report": "npm run -s browserify | node", | |
"test": "npm run -s report | coverify" | |
}, | |
"author": "Sebastiaan Deckers <[email protected]>", | |
"license": "ISC", | |
"devDependencies": { | |
"browserify": "^10.2.1", | |
"coverify": "^1.3.3", | |
"jadeify": "^4.3.0" | |
} | |
} |
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
h1 hello world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment