Skip to content

Commit c1856bf

Browse files
committed
Add collectCoverageFrom glob
1 parent 6a5b14d commit c1856bf

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
| Statements | Branches | Functions | Lines |
1111
| --- | --- | --- | --- |
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) |
12+
| ![Statements](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/Coverage-93.33%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.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"eslint": "eslint src/**/*.ts --cache --cache-location .cache/.eslintcache",
1616
"prettier": "prettier src/**/*.ts --check",
1717
"jest": "jest",
18-
"coverage": "jest --coverage",
18+
"coverage": "jest --coverage --collectCoverageFrom=\"./src/**/*.ts\"",
1919
"-----------------------------------------------PRE": "DIVIDER",
2020
"prebuild": "del-cli ./dist",
2121
"precoverage": "del-cli ./coverage",

src/to-path.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
// -----------------------------------------------------------------------------
2+
// Deps
3+
// -----------------------------------------------------------------------------
4+
15
import toPath from './to-path';
26

7+
// -----------------------------------------------------------------------------
8+
// Tests
9+
// -----------------------------------------------------------------------------
10+
311
const testCases: {
412
parameters: Parameters<typeof toPath>;
513
result: ReturnType<typeof toPath>;

src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export interface IPlainObject<GValue = any> {
2+
[p: string]: GValue;
3+
}

0 commit comments

Comments
 (0)