Skip to content

Commit

Permalink
[test] Use npm scripts instead of gulp (#3078)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiamsantos authored and darrachequesne committed Oct 16, 2017
1 parent 3f61165 commit f333479
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 113 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,3 +11,4 @@ node_modules
coverage
.idea
dist
.nyc_output
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

69 changes: 0 additions & 69 deletions gulpfile.js

This file was deleted.

13 changes: 3 additions & 10 deletions package.json
Expand Up @@ -21,7 +21,7 @@
"url": "git://github.com/socketio/socket.io"
},
"scripts": {
"test": "gulp test"
"test": "nyc mocha --reporter spec --slow 200 --bail --timeout 10000 test/socket.io.js"
},
"dependencies": {
"debug": "~2.6.6",
Expand All @@ -31,16 +31,9 @@
"socket.io-parser": "~3.1.1"
},
"devDependencies": {
"babel-preset-es2015": "^6.24.1",
"del": "^2.2.2",
"expect.js": "0.3.1",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-istanbul": "^1.1.1",
"gulp-mocha": "^4.3.1",
"gulp-task-listing": "1.0.1",
"istanbul": "^0.4.5",
"mocha": "^3.3.0",
"mocha": "^3.5.3",
"nyc": "^11.2.1",
"superagent": "1.6.1",
"supertest": "1.1.0"
},
Expand Down
31 changes: 5 additions & 26 deletions test/socket.io.js
@@ -1,12 +1,5 @@
var testVersion = process.env.TEST_VERSION;
var http = require('http').Server;
var io;
if (testVersion === 'compat') {
console.log('testing compat version');
io = require('../dist');
} else {
io = require('../lib');
}
var io = require('../lib');
var fs = require('fs');
var join = require('path').join;
var exec = require('child_process').exec;
Expand Down Expand Up @@ -432,18 +425,9 @@ describe('socket.io', function(){
});

describe('namespaces', function(){
var Socket;
if (testVersion === 'compat') {
Socket = require('../dist/socket');
} else {
Socket = require('../lib/socket');
}
var Namespace;
if (testVersion === 'compat') {
Namespace = require('../dist/namespace');
} else {
Namespace = require('../lib/namespace');
}
var Socket = require('../lib/socket');
var Namespace = require('../lib/namespace');

it('should be accessible through .sockets', function(){
var sio = io();
expect(sio.sockets).to.be.a(Namespace);
Expand Down Expand Up @@ -2123,12 +2107,7 @@ describe('socket.io', function(){
});

describe('middleware', function(done){
var Socket;
if (testVersion === 'compat') {
Socket = require('../dist/socket');
} else {
Socket = require('../lib/socket');
}
var Socket = require('../lib/socket');

it('should call functions', function(done){
var srv = http();
Expand Down

0 comments on commit f333479

Please sign in to comment.