diff --git a/.gitignore b/.gitignore index 0b23a410a08b93a6c604436796711c9589e2a68e..e3dbd959964d6f3ec8dcec90ef5cb8c77839be97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules /config.js /npm-debug.log +/coverage diff --git a/app/helpers/package-json.js b/app/helpers/package-json.js index 5bfb1e95a07cf27ef79a5c4e2a2af1605db5458f..680fb10d8f1784b0a448291730b41043d66b554e 100644 --- a/app/helpers/package-json.js +++ b/app/helpers/package-json.js @@ -39,8 +39,9 @@ function setNewValue(currentFileContent, depType, depName, newVersion) { } } } + // istanbul ignore if if (!newFileContent) { - throw new Error('Could not find old version'); + throw new Error('Could not set new value'); } return newFileContent; } diff --git a/package.json b/package.json index 27ebf3059187025cdc9d378bf6ad1514158687eb..b4deace2f7e132d0bb165495a0b84ae7de8fb431 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,10 @@ "version": "1.1.2", "main": "app/index.js", "scripts": { - "lint": "eslint .", + "lint": "eslint app", + "lint-fix": "eslint app --fix", "start": "node app", - "test": "mocha --recursive --reporter spec" + "test": "istanbul cover _mocha test/**/*" }, "repository": { "type": "git", @@ -41,6 +42,7 @@ "eslint-config-airbnb-base": "11.0.1", "eslint-plugin-import": "2.2.0", "eslint-plugin-promise": "3.4.0", + "istanbul": "0.4.5", "mocha": "3.2.0" } }