Skip to content

Commit

Permalink
Add nyc for test coverage (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
el-davo authored and bajtos committed May 24, 2017
1 parent 33af98e commit 42ca843
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
lerna-debug.log
node_modules
npm-debug.log
.DS_Store
.DS_Store
coverage
.nyc_output
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@
"typescript.tsdk": "./node_modules/typescript/lib",
"editor.tabSize": 2,
"editor.trimAutoWhitespace": true,

"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"coverage": true,
".nyc_output": true
},
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,

"tslint.ignoreDefinitionFiles": true,
// Temporarily disable linting & compilation of examples,
// because they are depending on features/APIs that are
Expand Down
19 changes: 18 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@types/request-promise": "^4.1.33",
"lerna": "^2.0.0-rc.4",
"mocha": "^3.2.0",
"nyc": "^10.3.2",
"request": "^2.79.0",
"request-promise": "^4.1.1",
"ts-node": "^2.0.0",
Expand All @@ -27,6 +28,22 @@
"lint": "tslint -c tslint.full.json --project tsconfig.json --type-check --exclude \"examples/**/*\" --exclude \"**/node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"",
"lint:fix": "npm run lint -- --fix",
"test": "mocha --opts test/mocha.opts \"packages/*/test/**/*.ts\"",
"posttest": "npm run lint"
"posttest": "npm run lint",
"coverage": "nyc npm test"
},
"nyc": {
"include": [
"packages/*/src/**/*.ts"
],
"extension": [
".ts"
],
"require": [
"ts-node/register"
],
"reporter": [
"html",
"lcov"
]
}
}

0 comments on commit 42ca843

Please sign in to comment.