Skip to content

Commit

Permalink
Adds .travis.yml and gulp test task
Browse files Browse the repository at this point in the history
This commit also updates karam to 0.13.22 to avoid
karma-runner/karma#1782 (sockets.forEach is not a function)
when running gulp test.
  • Loading branch information
benjamin-albert committed May 6, 2016
1 parent e7e7301 commit 47fe559
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- "5.10.1"
before_install:
- npm install -g gulp
13 changes: 13 additions & 0 deletions gulp/tasks/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var gulp = require('gulp');
var Server = require('karma').Server;
var path = require('path');

/**
* Run test once and exit
*/
gulp.task('test', function (done) {
new Server({
configFile: path.resolve(__dirname, '../../karma.conf.js'),
singleRun: true
}, done).start();
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
],
"scripts": {
"start": "node app.js",
"postinstall": "gulp build --prod"
"postinstall": "gulp build --prod",
"test": "gulp test"
},
"keywords": [
"dillinger",
Expand Down Expand Up @@ -110,7 +111,7 @@
"htmlparser2": "^3.8.3",
"jshint-stylish": "^1.0.0",
"json-loader": "^0.5.1",
"karma": "0.13.10",
"karma": "0.13.22",
"karma-chrome-launcher": "^0.1.5",
"karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4",
Expand Down

0 comments on commit 47fe559

Please sign in to comment.