diff --git a/.gitignore b/.gitignore index 3b4e8dcf..f3a9bb86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ lib/ node_modules/ + +.nyc_output/ +coverage/ +yarn.lock \ No newline at end of file diff --git a/package.json b/package.json index 5a5aaf34..eeccb660 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@types/mocha": "^7.0.1", "@types/node": "^10.12.21", "mocha": "^7.0.1", + "nyc": "^15.0.1", "rimraf": "^3.0.2", "tslint": "^6.0.0", "typescript": "^3.8.2" @@ -37,10 +38,13 @@ "clean": "rimraf lib", "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", "watch": "tsc -w -p ./src", - "test": "npm run compile && mocha && npm run lint", + "pretest": "npm run compile", + "test": "mocha", + "posttest": "npm run lint", + "coverage": "nyc -r lcov npm run test", "lint": "tslint src/**/*.ts", "install-types-next": "npm install vscode-languageserver-types@next -f -S && npm install vscode-languageserver-textdocument@next -f -S", "preversion": "npm test", "postversion": "git push && git push --tags" } -} +} \ No newline at end of file