Skip to content

Commit befe4ab

Browse files
committed
add npm run test:cover
1 parent d58b852 commit befe4ab

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules/
22
dist/
33
build/
44
package-lock.json
5+
.nyc_output/
6+
coverage/
57

.nycrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"include": ["src/**/*.ts"],
3+
"extension": [".ts"],
4+
"reporter": ["text", "html"],
5+
"sourceMap": true,
6+
"instrument": true
7+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "MessagePack implementation in JavaScript",
55
"main": "index.js",
66
"scripts": {
7-
"test": "TS_NODE_FILES=true mocha 'test/**/*.test.ts'"
7+
"test": "TS_NODE_FILES=true mocha 'test/**/*.test.ts'",
8+
"test:cover": "TS_NODE_FILES=true npx nyc mocha 'test/**/*.test.ts'"
89
},
910
"repository": {
1011
"type": "git",

0 commit comments

Comments
 (0)