Merge pull request #260 from maxpoulin64/mocha-lint

Improve tests execution
This commit is contained in:
Pavel Djundik 2016-05-09 11:29:11 +03:00
commit 9543fe060e
3 changed files with 15 additions and 3 deletions

View File

@ -18,3 +18,9 @@ deploy:
node: '4' node: '4'
tags: true tags: true
repo: thelounge/lounge repo: thelounge/lounge
script:
- npm run test:mocha
- npm run lint:js
- npm run lint:css

View File

@ -12,9 +12,14 @@
}, },
"scripts": { "scripts": {
"start": "node index", "start": "node index",
"build": "grunt && handlebars client/views/ -e tpl -f client/js/lounge.templates.js", "build": "npm run build:grunt && npm run build:handlebars",
"test": "HOME=test/fixtures mocha test/**/*.js && npm run lint", "build:grunt": "grunt",
"lint": "eslint . && stylelint \"**/*.css\"", "build:handlebars": "handlebars client/views/ -e tpl -f client/js/lounge.templates.js",
"test": "npm run test:mocha; npm run lint",
"test:mocha": "mocha -r test/fixtures/env.js test/**/*.js",
"lint": "npm run lint:js; npm run lint:css",
"lint:js": "eslint .",
"lint:css": "stylelint \"**/*.css\"",
"prepublish": "npm run build" "prepublish": "npm run build"
}, },
"keywords": [ "keywords": [

1
test/fixtures/env.js vendored Normal file
View File

@ -0,0 +1 @@
process.env.HOME = "test/fixtures";