From 9328e6d37dad95492c9036fcd8b424fcafa7f774 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 14 Aug 2023 16:36:33 -0700 Subject: [PATCH] [Tests] fix coverage --- .github/workflows/tests.yml | 3 ++- .gitignore | 5 +++-- .nycrc | 7 +++++++ package.json | 3 +-- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .nycrc diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 48bfabb..02c21d7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,8 @@ jobs: uses: ljharb/actions/.github/workflows/node-majors.yml@main with: range: '>= 12' - command: npm run tests-only && npm run coverage + command: npm run tests-only + coverage: coveralls node: name: 'node tests' diff --git a/.gitignore b/.gitignore index 8485c8b..26e5d8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .coveralls.yml -/.nyc_output/ -/node_modules/ +.nyc_output/ +coverage/ +node_modules/ diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..83e817b --- /dev/null +++ b/.nycrc @@ -0,0 +1,7 @@ +{ + "check-coverage": false, + "reporter": ["text-summary", "html", "json", "lcov"], + "exclude": [ + "test" + ] +} diff --git a/package.json b/package.json index 424c7df..474346f 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "lint": "eslint --ext=js,mjs .", "tests-only": "nyc mocha ./test/", "pretest": "npm run lint", - "test": "npm run tests-only", - "coverage": "nyc report --reporter=text-lcov | coveralls" + "test": "npm run tests-only" }, "keywords": [ "iana",