Skip to content

Commit 6a5b14d

Browse files
committed
Add coverage badges
1 parent 57dd9f3 commit 6a5b14d

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
[![NPM package badge](https://img.shields.io/badge/npm-install-orange.svg)](https://www.npmjs.com/package/plain-object-helpers)
66
![Test and Build status badge](https://github.com/JS-Helpers/plain-object-helpers/workflows/Test%20and%20Build/badge.svg)
77

8-
_Description_
8+
## Coverage
9+
10+
| Statements | Branches | Functions | Lines |
11+
| --- | --- | --- | --- |
12+
| ![Statements](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Functions](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) |

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
"coverage": "jest --coverage",
1919
"-----------------------------------------------PRE": "DIVIDER",
2020
"prebuild": "del-cli ./dist",
21+
"precoverage": "del-cli ./coverage",
2122
"-----------------------------------------------POST": "DIVIDER",
22-
"postbuild": "prettier dist/**/*.{d.ts,js} --check --write"
23+
"postbuild": "prettier dist/**/*.{d.ts,js} --check --write",
24+
"postcoverage": "istanbul-badges-readme"
2325
},
2426
"jest": {
2527
"cacheDirectory": "<rootDir>/.cache/jest",
28+
"coverageReporters": [
29+
"json-summary",
30+
"lcov"
31+
],
2632
"displayName": "tsc",
2733
"testEnvironment": "node",
2834
"moduleFileExtensions": [
@@ -68,18 +74,17 @@
6874
"@types/jest": "^25.2.1",
6975
"@typescript-eslint/eslint-plugin": "^2.30.0",
7076
"@typescript-eslint/parser": "^2.30.0",
77+
"del-cli": "^3.0.1",
7178
"eslint": "^6.8.0",
7279
"eslint-config-prettier": "^6.11.0",
7380
"eslint-config-wezom-relax-ts": "^0.3.1-beta",
7481
"eslint-plugin-flowtype": "^4.7.0",
7582
"eslint-plugin-import": "^2.20.2",
7683
"eslint-plugin-prettier": "^3.1.3",
84+
"istanbul-badges-readme": "^1.0.5",
7785
"jest": "^25.5.3",
7886
"prettier": "^2.0.5",
7987
"ts-jest": "^25.4.0",
8088
"typescript": "^3.8.3"
81-
},
82-
"dependencies": {
83-
"del-cli": "^3.0.1"
8489
}
8590
}

0 commit comments

Comments
 (0)