Skip to content

Commit

Permalink
Code Coverage (#249)
Browse files Browse the repository at this point in the history
* Add codecoverage
* On Travis executing with c8 is fine standalone
* need to pretest when running cover standalone
* Only include user facing commands in package json directly
  • Loading branch information
kristoferbaxter authored Dec 19, 2019
1 parent 859a8dd commit 468e68f
Show file tree
Hide file tree
Showing 4 changed files with 403 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ package-lock.json
.vscode/*
.DS_Store
dist/
transpile/
transpile/
coverage/*
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ node_js:
- "lts/*"
before_install:
- unset _JAVA_OPTIONS # JVM heap sizes break closure compiler. #11203.
script: yarn test
script:
- yarn pretest
- yarn c8 ava
- yarn c8 report --reporter=lcovonly
- yarn codecov
branches:
only:
- master
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
"scripts": {
"pretest": "rimraf dist transpile && tsc -p tsconfig.test.json & wait",
"test": "ava",
"precoverage": "c8 ava",
"coverage": "c8 report --reporter=html",
"postcoverage": "sirv coverage/",
"build": "rimraf dist transpile && tsc -p tsconfig.json & wait",
"postbuild": "rollup --config rollup.config.js",
"postbuild": "rollup -c",
"lint": "tslint -c tslint.json -p tsconfig.json",
"release": "np",
"prepublishOnly": "npm-run-all build"
Expand All @@ -46,6 +49,8 @@
"@types/temp-write": "3.3.0",
"ava": "2.4.0",
"builtins": "2.0.1",
"c8": "6.0.1",
"codecov": "3.6.1",
"husky": "3.1.0",
"lint-staged": "9.5.0",
"np": "5.2.1",
Expand All @@ -54,6 +59,7 @@
"rimraf": "3.0.0",
"rollup": "0.67.4",
"rollup-plugin-copy": "3.1.0",
"sirv-cli": "0.4.5",
"tslint": "5.20.1",
"typescript": "3.7.3"
},
Expand Down
Loading

0 comments on commit 468e68f

Please sign in to comment.