From d3083fa5294a666b5a11065dceff57bb585870b4 Mon Sep 17 00:00:00 2001 From: Arthur Araujo Date: Sat, 3 Feb 2024 11:32:49 -0300 Subject: [PATCH] Adding mocha coverage report to final --- .github/workflows/Checks.yml | 3 ++- .gitignore | 1 + package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Checks.yml b/.github/workflows/Checks.yml index 2cde488b..36ab613b 100644 --- a/.github/workflows/Checks.yml +++ b/.github/workflows/Checks.yml @@ -55,12 +55,13 @@ jobs: npm run test:electron-mocha-main npm run test:jest + npm run test:mocha - name: ' Create COV_REPORT' run: | mkdir COV_REPORT - name: ' Merge coverage results' run: | - npx istanbul-merge --out COV_REPORT/coverage-final.json coverage_c8/coverage-final.json coverage_jest/coverage-final.json + npx istanbul-merge --out COV_REPORT/coverage-final.json coverage_c8/coverage-final.json coverage_jest/coverage-final.json coverage_mocha/coverage-final.json - name: ' CodeCov' uses: codecov/codecov-action@v3 with: diff --git a/.gitignore b/.gitignore index ccd44bd0..1085677a 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ lib-cov coverage coverage_c8 coverage_jest +coverage_mocha *.lcov # nyc test coverage diff --git a/package.json b/package.json index b19af4dc..538b1d2c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "start": "electron .", "test": "npm-run-all test:*", "test:jest": "jest --runInBand --verbose=false --detectOpenHandles --colors --transformIgnorePatterns 'node_modules/(?!astronomia)/' -- ", - "test:mocha": "nyc --reporter=lcov --reporter=json mocha tests/*", + "test:mocha": "c8 -o ./coverage_mocha mocha tests/*", "test:electron-mocha-main": "c8 electron-mocha --config __tests__/electron-mocha-main.config.cjs", "setup:win": "node scripts/create_windows_installer.js" },