Skip to content

Commit 6ceda8a

Browse files
committed
Update testing to include coverage.
1 parent a73f904 commit 6ceda8a

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ node_modules
77
/node-client/src/typings.json
88
.vscode/*
99
examples/package-lock.json
10+
node-client/.nyc_output
1011

node-client/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@
1818
"clean": "rm -Rf node_modules/ dist/",
1919
"build": "tsc",
2020
"watch": "tsc --watch",
21-
"test": "mocha -r ts-node/register src/**/*_test.ts"
21+
"test": "nyc mocha"
22+
},
23+
"nyc": {
24+
"include": [ "src/**/*.ts" ],
25+
"extension": [ ".ts" ],
26+
"require": [ "ts-node/register" ],
27+
"reporter": [ "text-summary" ],
28+
"sourceMap": true,
29+
"instrument": true
2230
},
2331
"author": "Kubernetes Authors",
2432
"license": "Apache-2.0",
@@ -46,6 +54,7 @@
4654
"chai": "^4.0.2",
4755
"jasmine": "^2.8.0",
4856
"mocha": "^3.4.2",
57+
"nyc": "^12.0.2",
4958
"ts-node": "^3.1.0",
5059
"tslint": "^5.10.0",
5160
"typescript": "^2.6.2"

node-client/test/mocha.opts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--compilers ts-node/register
2+
--require source-map-support/register
3+
--full-trace
4+
--bail
5+
src/**/*_test.ts

0 commit comments

Comments
 (0)