mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
18 lines
396 B
JavaScript
18 lines
396 B
JavaScript
var expect = require('expect.js');
|
|
var eio = require('../');
|
|
|
|
describe('connection', function() {
|
|
this.timeout(10000);
|
|
|
|
it('should connect to localhost', function(done) {
|
|
var socket = new eio.Socket();
|
|
socket.on('open', function () {
|
|
socket.on('message', function (data) {
|
|
expect(data).to.equal('hi');
|
|
socket.close();
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
});
|