Skip to content

Commit 0173c4c

Browse files
committed
add coverage support
1 parent 5b9da02 commit 0173c4c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,5 @@ vendor/ocaml
141141
jscomp/.lsp
142142
.vscode/launch.json
143143
tracing*.json
144-
darwin/bsc
144+
darwin/bsc
145+
.nyc_output

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"devDependencies": {
3-
"mocha": "^6.2.2"
3+
"mocha": "^6.2.2",
4+
"nyc": "^15.0.0"
45
},
56
"bin": {
67
"bsb": "bsb",
@@ -13,7 +14,8 @@
1314
"test-theme": "node scripts/ciTest.js -theme",
1415
"test-bsb": "node scripts/ciTest.js -bsb",
1516
"test-ocaml": "node scripts/ciTest.js -ounit",
16-
"postinstall": "node scripts/install.js"
17+
"postinstall": "node scripts/install.js",
18+
"coverage" : "nyc --timeout=3000 --report=html mocha jscomp/test/*test.js && open ./coverage/index.html"
1719
},
1820
"name": "bs-platform",
1921
"version": "7.3.0-dev.1",

0 commit comments

Comments
 (0)