From c37aab9d332c4834b08ada94736c45ab1d39cd2f Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 3 Dec 2020 23:28:52 -0800 Subject: [PATCH] [Tests] run `nyc` on all tests --- .eslintignore | 1 + .nycrc | 13 +++++++++++++ package.json | 8 ++++---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .eslintignore create mode 100644 .nycrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/package.json b/package.json index 32a349b..0987472 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "scripts": { "prepublish": "safe-publish-latest", "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node --harmony --es-staging test", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc node test", + "test:harmony": "nyc node --harmony --es-staging test", "posttest": "npx aud --production", - "coverage": "covert test/index.js", "lint": "eslint .", "eccheck": "eclint check *.js **/*.js > /dev/null", "version": "auto-changelog && git add CHANGELOG.md", @@ -43,10 +43,10 @@ "@ljharb/eslint-config": "^17.1.0", "aud": "^1.1.2", "auto-changelog": "^2.2.0", - "covert": "^1.1.1", "eclint": "^2.8.1", "eslint": "^7.6.0", "foreach": "^2.0.5", + "nyc": "^10.3.2", "safe-publish-latest": "^1.1.4", "tape": "^5.0.1" },