From 0470a02b2fea7c512123c8e884b197191f8890d5 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 4 Feb 2017 00:29:34 +0100 Subject: [PATCH 1/2] Add istanbul unit testing coverage --- .gitignore | 10 +++++++++- package.json | 14 ++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 88ddd7288..f8e01d6b1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,11 +5,19 @@ sinopia-*.tgz ### !bin/sinopia test-storage* - node_modules + +# Istanbul +coverage/ +.nyc* + # Visual Studio Code .vscode/* .jscsrc .jshintrc jsconfig.json + + +# Yarn +yarn* \ No newline at end of file diff --git a/package.json b/package.json index 730c2f2af..ea82437b7 100644 --- a/package.json +++ b/package.json @@ -43,20 +43,21 @@ "unix-crypt-td-js": "^1.0.0" }, "devDependencies": { - "rimraf": "^2.5.2", "bluebird": "^3.3.5", - "mocha": "^2.4.5", - "eslint": "^2.9.0", "browserify": "^13.0.0", "browserify-handlebars": "^1.0.0", + "eslint": "^2.9.0", "grunt": "^1.0.1", - "grunt-cli": "^1.2.0", "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", "grunt-contrib-less": "^1.3.0", "grunt-contrib-watch": "^1.0.0", - "unopinionate": "^0.0.4", + "mocha": "^2.4.5", + "nyc": "^10.1.2", "onclick": "^0.1.0", - "transition-complete": "^0.0.2" + "rimraf": "^2.5.2", + "transition-complete": "^0.0.2", + "unopinionate": "^0.0.4" }, "keywords": [ "private", @@ -69,6 +70,7 @@ ], "scripts": { "test": "eslint . && mocha ./test/functional ./test/unit", + "test:coverage": "nyc --reporter=html --reporter=text mocha -R spec ./test/functional ./test/unit", "test-travis": "eslint . && mocha -R spec ./test/functional ./test/unit", "test-only": "mocha ./test/functional ./test/unit", "lint": "eslint ." From ffb3c0e6d0fda18b943c88fb680140481ddcc8e7 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 4 Feb 2017 00:32:54 +0100 Subject: [PATCH 2/2] add travis coverage configuration --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea82437b7..705ee5b8c 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "scripts": { "test": "eslint . && mocha ./test/functional ./test/unit", "test:coverage": "nyc --reporter=html --reporter=text mocha -R spec ./test/functional ./test/unit", - "test-travis": "eslint . && mocha -R spec ./test/functional ./test/unit", + "test-travis": "eslint . && npm run test:coverage", "test-only": "mocha ./test/functional ./test/unit", "lint": "eslint ." },