mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
|
|
var expect = require('expect.js');
|
|
var eio = require('../');
|
|
|
|
describe('engine.io-client', function () {
|
|
|
|
it('should expose protocol number', function () {
|
|
expect(eio.protocol).to.be.a('number');
|
|
});
|
|
|
|
it('should properly parse http uri without port', function(done) {
|
|
var server = eio('http://localhost');
|
|
server.on('close', function() {
|
|
done();
|
|
});
|
|
expect(server.port).to.be('80');
|
|
server.close();
|
|
});
|
|
|
|
it('should properly parse https uri without port', function(done) {
|
|
var server = eio('https://localhost');
|
|
server.on('close', function() {
|
|
done();
|
|
});
|
|
expect(server.port).to.be('443');
|
|
server.close();
|
|
});
|
|
|
|
it('should properly parse wss uri without port', function(done) {
|
|
var server = eio('wss://localhost');
|
|
server.on('close', function() {
|
|
done();
|
|
});
|
|
expect(server.port).to.be('443');
|
|
server.close();
|
|
});
|
|
|
|
it('should properly parse wss uri with port', function(done) {
|
|
var server = eio('wss://localhost:2020');
|
|
server.on('close', function() {
|
|
done();
|
|
});
|
|
expect(server.port).to.be('2020');
|
|
server.close();
|
|
});
|
|
|
|
});
|