Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: false
language: node_js
node_js:
- "0.8"
- "0.10"
- "0.12"
- "4.0.0"
Expand Down
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@

TESTS = test/*.js
BENCHMARKS = $(shell find bench -type f ! -name 'runner.js')
REPORTER = dot

test:
@./node_modules/.bin/mocha \
--reporter $(REPORTER) \
--slow 500ms \
--bail \
--globals ___eio,document \
$(TESTS)
@./node_modules/.bin/gulp test

test-cov: lib-cov
EIO_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
Expand Down
30 changes: 30 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var babel = require("gulp-babel");

var TESTS = 'test/*.js';
var REPORTER = 'dot';

gulp.task("default", ["transpile"]);

gulp.task('test', function(){
return gulp.src(TESTS, {read: false})
.pipe(mocha({
slow: 500,
reporter: REPORTER,
bail: true
}))
.once('error', function(){
process.exit(1);
})
.once('end', function(){
process.exit();
});
});

// By default, individual js files are transformed by babel and exported to /dist
gulp.task("transpile", function(){
return gulp.src(["lib/*.js","lib/transports/*.js"], { base: 'lib' })
.pipe(babel({ "presets": ["es2015"] }))
.pipe(gulp.dest("dist"));
});
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@
"accepts": "1.1.4"
},
"devDependencies": {
"babel-preset-es2015": "6.3.13",
"engine.io-client": "1.6.8",
"expect.js": "0.2.0",
"gulp": "3.9.0",
"gulp-babel": "6.1.1",
"gulp-mocha": "2.2.0",
"mocha": "2.3.4",
"s": "0.1.1",
"superagent": "0.15.4"
},
"scripts": {
"test": "make test"
"test": "./node_modules/.bin/gulp test"
},
"repository": {
"type": "git",
Expand Down