Skip to content

Commit 48e6fb5

Browse files
committed
add istanbul test coverage tool + move code in src folder
1 parent b361de4 commit 48e6fb5

File tree

7 files changed

+13
-2
lines changed

7 files changed

+13
-2
lines changed

.babelrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"presets": ["env"]
2+
"presets": ["env"],
3+
"env": {
4+
"test": {
5+
"plugins": ["istanbul"]
6+
}
7+
}
38
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules
22
.git
33
.DS_Store
4+
npm-debug.log
5+
.nyc_output
6+
coverage

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Web development training with Coding Dojo : Katas + TDD (software craftmanship)",
55
"main": "index.js",
66
"scripts": {
7-
"test": "jest --watch"
7+
"test": "jest --watch",
8+
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest src"
89
},
910
"repository": {
1011
"type": "git",
@@ -19,6 +20,8 @@
1920
"homepage": "https://github.com/yao-dev/katas#readme",
2021
"devDependencies": {
2122
"babel-core": "^6.26.0",
23+
"babel-plugin-istanbul": "^4.1.5",
24+
"nyc": "^11.4.1",
2225
"babel-preset-env": "^1.6.1",
2326
"jest": "^21.2.1"
2427
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)