Skip to content

Commit

Permalink
chore(build): fix coverage reporting with nyc
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Dec 6, 2017
1 parent 9eb3fb5 commit 374e722
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 29 deletions.
26 changes: 26 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"include": [
"src/*.ts",
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts",
"**/*.spec.ts"
],
"extension": [
".ts"
],
"require": [
"ts-node/register"
],
"reporter": [
"text-summary",
"lcovonly"
],
"sourceMap": true,
"instrument": true,
"lines": 90,
"statements": 90,
"functions": 90,
"branches": 90
}
36 changes: 7 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@
"typings": "./src/types/custom.d.ts",
"scripts": {
"build": "tsc",
"clean": "rimraf docs dist dist-web coverage logs pacts jscpd.json",
"coverage": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"clean": "rimraf docs dist dist-web coverage .nyc_output logs pacts jscpd.json",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"deploy:prepare": "./scripts/create_npmrc_file.sh",
"dist": "npm run build && webpack --config ./config/webpack.web.config.js",
"jscpd": "jscpd -p src -r json -o jscpd.json",
"lint": "standard && tslint -c tslint.json 'src/**/*.ts'",
"postdist": "npm t",
"posttest": "npm run test:checkCoverage && npm run test:karma",
"posttest": "npm run test:karma",
"predist": "npm run clean && npm run lint && npm run jscpd",
"prerelease": "npm i && rm package-lock.json",
"publish": "./scripts/publish.sh",
"release": "standard-version",
"test": "nyc mocha",
"test:checkCoverage": "istanbul check",
"test": "nyc --check-coverage --reporter=html --reporter=text mocha",
"test:examples": "npm run test:e2e-examples && npm run test:jest-examples && npm run test:mocha-examples && npm run test:ava-examples",
"test:e2e-examples": "cd examples/e2e && npm i && npm t",
"test:ava-examples": "cd examples/ava && npm i && npm t",
Expand All @@ -32,28 +31,6 @@
"travis": "./scripts/build.sh",
"webpack": "webpack --config ./config/webpack.web.config.js"
},
"nyc": {
"include": [
"src/*.ts",
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts",
"**/*.spec.ts"
],
"extension": [
".ts"
],
"require": [
"ts-node/register"
],
"reporter": [
"text-summary",
"lcovonly"
],
"sourceMap": true,
"instrument": true
},
"repository": {
"type": "git",
"url": "git+https://github.com/pact-foundation/pact-js.git"
Expand All @@ -70,7 +47,8 @@
"consumer driven testing"
],
"author": "Beth Skurrie <beth@bethesque.com> (https://github.com/bethesque)",
"contributors": [{
"contributors": [
{
"name": "Tarcio Saraiva",
"email": "tarcio@gmail.com",
"url": "http://twitter.com/tarciosaraiva"
Expand Down Expand Up @@ -134,7 +112,7 @@
"bluebird": "3.x",
"chai": "3.x",
"chai-as-promised": "5.x",
"coveralls": "^2.13.1",
"coveralls": "^2.13.3",
"enhanced-resolve": "^3.4.1",
"es6-promise": "^4.1.1",
"imports-loader": "0.x",
Expand Down

0 comments on commit 374e722

Please sign in to comment.