Skip to content

Instantly share code, notes, and snippets.

@nkint
Created February 1, 2016 14:25
Show Gist options
  • Save nkint/ce08c57d97631da514bf to your computer and use it in GitHub Desktop.
Save nkint/ce08c57d97631da514bf to your computer and use it in GitHub Desktop.
node.js test coverage with istanbul nom script
{
"name": "test coverage example",
...
"scripts": {
"test": "NODE_ENV=test mocha --colors build/spec --timeout 5000",
"coverage": "NODE_ENV=test ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -R spec"
},
"dependencies": {
...
},
"devDependencies": {
"chai": "^3.4.1",
"istanbul": "^0.4.2",
"mocha": "^2.3.4",
"sinon": "^1.17.2",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment