From 739da9e7ee22b91434f9e440dc43980be72f7104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20=C5=9Ei=C5=9Fmano=C4=9Flu?= Date: Wed, 7 Feb 2024 14:23:47 +0300 Subject: [PATCH] Chore(coverage): Add nyc configuration and update test coverage commands --- .nycrc | 9 +++++++++ package.json | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .nycrc diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..e59664c --- /dev/null +++ b/.nycrc @@ -0,0 +1,9 @@ +{ + "reporter": ["lcov"], + "all": true, + "check-coverage": true, + "branches": 80, + "lines": 80, + "functions": 80, + "statements": 80 +} diff --git a/package.json b/package.json index 6076ce2..775a5d8 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "scripts": { "test": "mocha test/**/*Test.js", "samples": "mocha samples/**/*Samples.js", - "cover": "istanbul cover _mocha", - "coveralls": "npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls" + "cover": "nyc npm test", + "coveralls": "nyc report --reporter=text-lcov | coveralls" }, "repository": { "type": "git", @@ -40,7 +40,8 @@ "coveralls": "^2.11.6", "istanbul": "^0.4.2", "mocha": "^10.2.0", - "mocha-lcov-reporter": "^1.0.0", + "mocha-lcov-reporter": "^1.3.0", + "nyc": "^15.1.0", "should": "^8.2.1" } }