From 056aba8a9ee5a2afcb82f9377678fc29f64e11fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Thu, 29 Dec 2016 02:51:26 -0500 Subject: [PATCH] Switch istanbul CLI to more recent nyc one `nyc` is made by the Istanbul people and is meant to integrate nicely with Babel. Note that at the moment this is just a drop-in replacement of what we currently have in order to fix broken `npm run coverage`, therefore it does not support our recent ES6 stuff. --- .gitignore | 1 + .istanbul.yml | 6 ------ .nycrc | 14 ++++++++++++++ package.json | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) delete mode 100644 .istanbul.yml create mode 100644 .nycrc diff --git a/.gitignore b/.gitignore index 205dd543..96ca16d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ node_modules/ npm-debug.log +.nyc_output/ coverage/ # Built assets created at npm install/prepublish time diff --git a/.istanbul.yml b/.istanbul.yml deleted file mode 100644 index f5671bc8..00000000 --- a/.istanbul.yml +++ /dev/null @@ -1,6 +0,0 @@ -instrumentation: - include-all-sources: true - excludes: - - client/js/bundle.js - - client/js/bundle.vendor.js - - client/js/lounge.js diff --git a/.nycrc b/.nycrc new file mode 100644 index 00000000..998e5bac --- /dev/null +++ b/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "exclude": [ + "client/js/bundle.js", + "client/js/bundle.vendor.js", + "coverage/", + "test/" + ], + "reporter": [ + "lcov", + "text", + "text-summary" + ] +} diff --git a/package.json b/package.json index c430d8b8..7fa3652a 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "homepage": "https://thelounge.github.io/", "scripts": { - "coverage": "istanbul cover node_modules/mocha/bin/_mocha", + "coverage": "nyc mocha", "start": "node index", "start-dev": "npm-run-all --parallel watch start", "build": "npm-run-all build:*", @@ -66,12 +66,12 @@ "font-awesome": "4.7.0", "handlebars": "4.0.6", "handlebars-loader": "1.4.0", - "istanbul": "0.4.5", "jquery": "2.1.1", "jquery-ui": "1.12.1", "mocha": "3.2.0", "mousetrap": "1.4.6", "npm-run-all": "3.1.2", + "nyc": "10.0.0", "socket.io-client": "1.7.2", "stylelint": "7.7.0", "urijs": "1.16.1",