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

Use npm scripts #3078

Merged
merged 3 commits into from
Oct 16, 2017
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: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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