Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanba committed Jan 20, 2018
1 parent 46fb0ed commit 74ae84d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/dist/
/dist/
/coverage/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Based on [graphlib](https://github.com/dagrejs/graphlib), written in TypeScript.

[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![Build Status](https://travis-ci.org/zhanba/graph-lib.svg?branch=master)](https://travis-ci.org/zhanba/graph-lib)
[![Coverage Status](https://coveralls.io/repos/github/zhanba/graph-lib/badge.svg?branch=master)](https://coveralls.io/github/zhanba/graph-lib?branch=master)
## developing...

```
Expand Down
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ module.exports = {
"jsx",
"json",
"node"
],
mapCoverage: true, // for ts
collectCoverage: true,
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!**/node_modules/**",
"!**/dist/**"
]
};
33 changes: 33 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
"prepare": "npm run build",
"build": "tsc",
"lint": "",
"test": "jest"
"test": "jest --coverage && cat ./coverage/lcov.info | coveralls"
},
"author": "ryannz",
"license": "MIT",
"devDependencies": {
"@types/jest": "^22.0.1",
"coveralls": "^3.0.0",
"jest": "^22.0.6",
"ts-jest": "^22.0.1",
"tslint": "^5.8.0",
Expand Down

0 comments on commit 74ae84d

Please sign in to comment.