Add code coverage

This commit is contained in:
Jérémie Astori 2016-06-16 02:42:24 -04:00
parent f7a0032a6a
commit 053e8a0e36
6 changed files with 20 additions and 1 deletions

View File

@ -5,3 +5,5 @@ client/js/lounge.templates.js
# third party # third party
client/js/libs/jquery/*.js client/js/libs/jquery/*.js
client/js/libs/*.js client/js/libs/*.js
coverage/

4
.gitignore vendored
View File

@ -1,6 +1,10 @@
# Make sure to keep this file and .npmignore in sync
node_modules/ node_modules/
npm-debug.log npm-debug.log
coverage/
# Built assets created at npm install/prepublish time # Built assets created at npm install/prepublish time
# See https://docs.npmjs.com/misc/scripts # See https://docs.npmjs.com/misc/scripts
client/fonts/ client/fonts/

8
.istanbul.yml Normal file
View File

@ -0,0 +1,8 @@
instrumentation:
include-all-sources: true
excludes:
- Gruntfile.js
- client/js/libs/*.js
- client/js/libs/jquery/*.js
- client/js/libs.min.js
- client/js/lounge.js

View File

@ -1,3 +1,5 @@
# This should match the .gitignore file without the generated assets # This should match the .gitignore file without the generated assets
# npm-debug.log and node_modules/ are ignored by default. # npm-debug.log and node_modules/ are ignored by default.
# See https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package # See https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package
coverage/

View File

@ -1,6 +1,7 @@
{ {
"ignoreFiles": [ "ignoreFiles": [
"client/css/bootstrap.css" "client/css/bootstrap.css",
"coverage/**/*.css"
], ],
"rules": { "rules": {
"at-rule-empty-line-before": ["always", { "at-rule-empty-line-before": ["always", {

View File

@ -15,6 +15,7 @@
}, },
"homepage": "https://thelounge.github.io/", "homepage": "https://thelounge.github.io/",
"scripts": { "scripts": {
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -r test/fixtures/env.js test/**/*.js",
"start": "node index", "start": "node index",
"build": "npm run build:font-awesome && npm run build:grunt && npm run build:handlebars", "build": "npm run build:font-awesome && npm run build:grunt && npm run build:handlebars",
"build:font-awesome": "node scripts/build-fontawesome.js", "build:font-awesome": "node scripts/build-fontawesome.js",
@ -64,6 +65,7 @@
"grunt-contrib-uglify": "1.0.1", "grunt-contrib-uglify": "1.0.1",
"grunt-contrib-watch": "1.0.0", "grunt-contrib-watch": "1.0.0",
"handlebars": "4.0.5", "handlebars": "4.0.5",
"istanbul": "0.4.3",
"mocha": "2.4.5", "mocha": "2.4.5",
"npm-run-all": "2.1.1", "npm-run-all": "2.1.1",
"stylelint": "6.6.0" "stylelint": "6.6.0"