From f360d0830da049490f27f89d365ec2bfd6362a70 Mon Sep 17 00:00:00 2001 From: Erik Golinelli Date: Sun, 12 May 2024 21:03:45 +0200 Subject: [PATCH] Track coverage using C8 (#96) * track coverage using c8 * Fix: tests runs twice --- .github/workflows/ci.yml | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9de309..2d240c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,4 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm install - - run: npm test + - run: npm run test:coverage diff --git a/package.json b/package.json index 69f7b0d..2bd36fe 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "lint": "eslint src/*.js test/*.js", "test-generate-mo": "msgfmt test/fixtures/latin13.po -o test/fixtures/latin13.mo & msgfmt test/fixtures/utf8.po -o test/fixtures/utf8.mo & msgfmt test/fixtures/obsolete.po -o test/fixtures/obsolete.mo", "test": "mocha", + "test:coverage": "npx c8 --check-coverage npm run test", "preversion": "npm run lint && npm test", "postversion": "git push && git push --tags", "prepublishOnly": "npm i && tsc && npm run lint && npm run test" @@ -44,7 +45,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.1.1", - "mocha": "^10.3.0", + "mocha": "^10.4.0", "typescript": "^5.4.5" }, "keywords": [