Skip to content

Commit 53d9599

Browse files
authored
Merge pull request #5 from brunolm/test-coverage
Add test coverage scripts and config
2 parents eb0b864 + d5ecec8 commit 53d9599

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ Each Pull Request will contain explanation and steps taken to complete a feature
1111
## Tests
1212

1313
- [Setup tests](https://github.com/brunolm/react-how-to/pull/1)
14+
- [Setup test coverage](https://github.com/brunolm/react-how-to/pull/5)
15+
1416
- [Add project on Travis CI](https://github.com/brunolm/react-how-to/pull/2)

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@
1111
"start": "react-scripts-ts start",
1212
"build": "react-scripts-ts build",
1313
"test": "react-scripts-ts test --env=jsdom",
14+
"coverage": "npm test -- --coverage",
1415
"eject": "react-scripts-ts eject"
1516
},
17+
"jest": {
18+
"collectCoverageFrom": [
19+
"!src/(index|specHelper).tsx",
20+
"!src/(setupTests|registerServiceWorker).ts",
21+
"src/**/*.{ts,tsx}"
22+
]
23+
},
1624
"devDependencies": {
1725
"@types/enzyme": "^3.1.4",
1826
"@types/enzyme-adapter-react-16": "^1.0.1",

0 commit comments

Comments
 (0)