From 33c71c1552dba1208f2d7cd518217873f2e3bb6c Mon Sep 17 00:00:00 2001 From: Hage Yaapa Date: Tue, 18 Jun 2019 12:34:21 +0530 Subject: [PATCH] chore: add coverage Add coverage to the project --- .gitignore | 2 +- .travis.yml | 2 ++ package.json | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 525a160d9..9785e4864 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules coverage .idea - +.nyc_output/ diff --git a/.travis.yml b/.travis.yml index cf1c49d92..12d51d944 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,3 +16,5 @@ addons: - mongodb-org-shell services: - mongodb + +after_success: npm run coverage diff --git a/package.json b/package.json index fd4b6ff2b..6556945b0 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,11 @@ "author": "IBM Corp.", "main": "index.js", "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", "benchmarks": "make benchmarks", "leak-detection": "make leak-detection", "coverage": "nyc report --reporter=text-lcov | coveralls", - "test": "mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js", + "test": "nyc mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js", "lint": "eslint .", "posttest": "npm run lint" }, @@ -38,12 +39,14 @@ "devDependencies": { "benchmark": "^2.1.4", "bluebird": "^3.5.4", + "coveralls": "^3.0.4", "eslint": "^5.1.0", "eslint-config-loopback": "^13.0.0", "juggler-v3": "file:./deps/juggler-v3", "juggler-v4": "file:./deps/juggler-v4", "loopback-datasource-juggler": "^3.0.0 || ^4.0.0", "mocha": "^5.2.0", + "nyc": "^14.1.1", "rc": "^1.2.8", "semver": "^5.5.1", "should": "^13.2.1",