Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tests execution #260

Merged
merged 1 commit into from May 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -18,3 +18,9 @@ deploy:
node: '4'
tags: true
repo: thelounge/lounge

script:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, perhaps we should be invoking build commands too? They could potentially fail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They would fail at npm install time. I think this is good as is for now, we can improve later but this PR already solves @maxpoulin64's (and probably others') issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it does run it and hides the output. Do we know if travis fails the build if grunt/handlebars build fails at that stage?

- npm run test:mocha
- npm run lint:js
- npm run lint:css

11 changes: 8 additions & 3 deletions package.json
Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/env.js
@@ -0,0 +1 @@
process.env.HOME = "test/fixtures";