diff --git a/.gitignore b/.gitignore index c972dcfc96..45e49b5a13 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ node_modules/ tmp/ *.log .idea/ -coverage/ yarn.lock -package-lock.json \ No newline at end of file +package-lock.json +.nyc_output/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7f2f12fbdd..acf9276ec2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,6 @@ script: after_script: - npm install coveralls - - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + - nyc report --reporter=text-lcov | coveralls dist: trusty diff --git a/package.json b/package.json index 3cf182ce70..1a967531b2 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "eslint": "eslint-ci .", "test": "mocha test/index.js", - "test-cov": "istanbul cover --print both _mocha -- test/index.js", + "test-cov": "nyc npm run test", "lint-staged": "lint-staged" }, "directories": { @@ -72,9 +72,9 @@ "eslint-config-hexo": "^3.0.0", "hexo-renderer-marked": "^0.3.0", "husky": "^1.1.3", - "istanbul": "^0.4.3", "lint-staged": "^8.1.0", "mocha": "^6.0.0", + "nyc": "^14.1.1", "rewire": "^4.0.1", "sinon": "^7.1.1" },