Skip to content

Commit 5ba1098

Browse files
committed
Coverage testing
1 parent 43dbcd5 commit 5ba1098

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.github/workflows/codacy.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ jobs:
2828
- name: Run tests and collect coverage
2929
run: |
3030
# Replace with the actual command to run your tests
31-
npm test
32-
33-
# Generate code coverage report using nyc (Istanbul)
34-
nyc report --reporter=lcov > $GITHUB_WORKSPACE/lcov.info
35-
nyc report --reporter=text-summary # Display summary in the console
31+
npm run test-with-coverage
32+
continue-on-error: true
3633

3734
- name: Upload coverage report to Codacy
3835
env:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test-with-coverage": "nyc --reporter=lcov --reporter=text-summary jest"
88
},
99
"keywords": [],
1010
"author": "",

0 commit comments

Comments
 (0)