PageRenderTime 84ms CodeModel.GetById 40ms app.highlight 7ms RepoModel.GetById 34ms app.codeStats 0ms

/js/lib/Socket.IO-node/tests/index.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | b6c3552a2098cd450aa8193ae84d0468 MD5 | raw file
 1var io = require('socket.io')
 2  , assert = require('assert')
 3  , Listener = io.Listener;
 4
 5module.exports = {
 6
 7  'test server initialization': function(){
 8    var _server = require('http').createServer(function(){})
 9      , _socket = io.listen(_server, { log: null });
10    assert.ok(_socket instanceof Listener);
11    _server.listen(7000, function(){
12      setTimeout(function(){
13        _server.close();
14      }, 100);
15    })
16  }
17
18};