From d090bd287a9fe4057e0c9606ba50a0feeed88b81 Mon Sep 17 00:00:00 2001 From: Uiolee <22849383+uiolee@users.noreply.github.com> Date: Fri, 1 Sep 2023 00:53:32 +0800 Subject: [PATCH] test: replace nyc with c8 (#356) * test: replace nyc with c8 * Rename .nycrc.json to .c8rc.json --- .c8rc.json | 3 +++ .nycrc.yml | 2 -- package.json | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .c8rc.json delete mode 100644 .nycrc.yml diff --git a/.c8rc.json b/.c8rc.json new file mode 100644 index 00000000..1332352d --- /dev/null +++ b/.c8rc.json @@ -0,0 +1,3 @@ +{ + "all": "true" +} diff --git a/.nycrc.yml b/.nycrc.yml deleted file mode 100644 index 03976439..00000000 --- a/.nycrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -# https://github.com/istanbuljs/nyc#common-configuration-options -all: true \ No newline at end of file diff --git a/package.json b/package.json index 348d396c..968b1d3b 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "eslint": "eslint lib test", "pretest": "npm run clean && npm run build", "test": "mocha --require ts-node/register", - "test-cov": "nyc --reporter=lcovonly npm run test", + "test-cov": "c8 --reporter=lcovonly npm run test", "build:highlight": "node scripts/build_highlight_alias.js", "postinstall": "npm run build:highlight" }, @@ -39,6 +39,7 @@ "@types/prismjs": "^1.26.0", "@typescript-eslint/eslint-plugin": "^5.41.0", "@typescript-eslint/parser": "^5.41.0", + "c8": "^8.0.1", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", "eslint": "^8.23.0", @@ -46,7 +47,6 @@ "html-entities": "^2.3.3", "html-tag-validator": "^1.6.0", "mocha": "^10.0.0", - "nyc": "^15.1.0", "rewire": "^6.0.0", "ts-node": "^10.9.1", "typescript": "^5.0.3"