From d009e5b5be0dbfb742586cba8087e793d4ce57f8 Mon Sep 17 00:00:00 2001 From: David Anson Date: Sat, 1 Jun 2019 12:05:55 -0700 Subject: [PATCH] Update code coverage script to fail if coverage drops below 100%, show only failures. --- .nycrc.json | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .nycrc.json diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 00000000..762aabb4 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,6 @@ +{ + "branches": 100, + "functions": 100, + "lines": 100, + "statements": 100 +} diff --git a/package.json b/package.json index b591f21c..fc7b1619 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "bugs": "https://github.com/DavidAnson/markdownlint/issues", "scripts": { "test": "nodeunit test/markdownlint-test.js", - "test-cover": "nyc node_modules/nodeunit/bin/nodeunit test/markdownlint-test.js", + "test-cover": "nyc --check-coverage --skip-full node_modules/nodeunit/bin/nodeunit test/markdownlint-test.js", "test-extra": "nodeunit test/markdownlint-test-extra.js", "debug": "node debug node_modules/nodeunit/bin/nodeunit", "lint": "eslint lib helpers test schema && eslint --env browser --global markdownit --global markdownlint --rule \"no-unused-vars: 0, no-extend-native: 0, max-statements: 0, no-console: 0, no-var: 0\" demo && eslint --rule \"no-console: 0, no-invalid-this: 0, no-shadow: 0, object-property-newline: 0\" example",