Files
socket.io/test/support/env.js
2015-12-03 19:37:30 +09:00

17 lines
399 B
JavaScript

// WARNING this is bad practice
// we only do this in our tests because we need to test engine.io-client
// support in browsers and in node.js
// some tests do not yet work in both
exports.browser = !!global.window;
exports.node = !exports.browser;
if (!global.location) {
global.location = {
protocol: 'http:',
host: 'localhost:3210',
hostname: 'localhost',
port: '3210'
};
}