From 1832ad535d61ec766a16c477b27cf1845a35cfa7 Mon Sep 17 00:00:00 2001 From: HyunSangHan Date: Sat, 19 Oct 2019 15:23:04 +0900 Subject: [PATCH 1/2] Add script for 'unit-coverage-report' --- package-scripts.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package-scripts.js b/package-scripts.js index 6d9985b90d..ba3ea8d820 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -263,6 +263,10 @@ module.exports = { description: 'Output HTML coverage report to coverage/index.html (run tests with COVERAGE=1 first)' }, + 'unit-coverage-report': { + script: 'nyc nps test.node.unit && nyc report --reporter=text', + description: 'Output unit test coverage report to text' + }, docs: { default: { script: From faaf42d87bc4784f6fc0bd27548c2c5336bd53f8 Mon Sep 17 00:00:00 2001 From: HyunSangHan Date: Sat, 23 Nov 2019 08:56:18 +0900 Subject: [PATCH 2/2] Reflect a feedback Rename the script to coverage and change the script --- package-scripts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package-scripts.js b/package-scripts.js index ba3ea8d820..8f467c20cc 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -263,9 +263,10 @@ module.exports = { description: 'Output HTML coverage report to coverage/index.html (run tests with COVERAGE=1 first)' }, - 'unit-coverage-report': { - script: 'nyc nps test.node.unit && nyc report --reporter=text', - description: 'Output unit test coverage report to text' + coverage: { + script: + 'cross-env COVERAGE=1 nps test.node && nyc report --reporter=text', + description: 'Output all the Node.js tests coverage report to text' }, docs: { default: {