From 164b983f993f14944d53d0f5939a114f57747b5d Mon Sep 17 00:00:00 2001 From: Maxime Poulin Date: Mon, 2 May 2016 00:55:45 -0400 Subject: [PATCH] Always run all tests and test them each individually on travis --- .travis.yml | 6 ++++++ package.json | 11 ++++++++--- test/fixtures/env.js | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 test/fixtures/env.js diff --git a/.travis.yml b/.travis.yml index eadf2652..5194eaa9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,3 +18,9 @@ deploy: node: '4' tags: true repo: thelounge/lounge + +script: +- npm run test:mocha +- npm run lint:js +- npm run lint:css + diff --git a/package.json b/package.json index 7423b347..349008cd 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,14 @@ }, "scripts": { "start": "node index", - "build": "grunt && handlebars client/views/ -e tpl -f client/js/lounge.templates.js", - "test": "HOME=test/fixtures mocha test/**/*.js && npm run lint", - "lint": "eslint . && stylelint \"**/*.css\"", + "build": "npm run build:grunt && npm run build:handlebars", + "build:grunt": "grunt", + "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" }, "keywords": [ diff --git a/test/fixtures/env.js b/test/fixtures/env.js new file mode 100644 index 00000000..2c875590 --- /dev/null +++ b/test/fixtures/env.js @@ -0,0 +1 @@ +process.env.HOME = "test/fixtures";