From cbe24c8e8d41abe0b90d787499c40c37b1f7c275 Mon Sep 17 00:00:00 2001 From: Mathias Schilling Date: Sat, 29 Apr 2017 00:48:06 +0200 Subject: [PATCH] Add test coverage with istanbul --- .gitignore | 4 ++++ package.json | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 38a7a09..76c4561 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,7 @@ lib # Logs npm-debug.log + +# Istanbul coverage +.nyc_output +coverage/ diff --git a/package.json b/package.json index f1a65b8..bfdaf33 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "url": "https://www.matchilling.com" }, "homepage": "https://botlang.org", - "version": "0.1.0", + "version": "0.1.1", "license": "GPL-3.0", "description": "Botlang implementation for JavaScript", "keywords": [ @@ -31,16 +31,19 @@ "devDependencies": { "babel-cli": "^6.23.0", "babel-core": "^6.24.0", + "babel-plugin-istanbul": "^4.1.1", "babel-preset-es2015": "^6.22.0", "chai": "^3.5.0", "esdoc": "^0.5.2", "eslint": "^3.17.0", "eslint-config-matchilling": "^2.1.0", "eslint-plugin-import": "^2.2.0", - "mocha": "^3.2.0" + "mocha": "^3.2.0", + "nyc": "^10.2.0" }, "scripts": { "compile": "./node_modules/.bin/babel --minified --no-comments --out-dir lib/ src/", + "coverage": "./node_modules/.bin/nyc --check-coverage npm test", "dev": "./node_modules/.bin/mocha --compilers js:babel-core/register --recursive --watch test/", "docs:make": "./node_modules/.bin/esdoc -c .esdoc.json", "eslint": "./node_modules/.bin/eslint src/", @@ -53,6 +56,8 @@ ] }, "babel": { - "presets": ["es2015"] + "presets": [ + "es2015" + ] } }