aboutsummaryrefslogtreecommitdiffstats
path: root/signaling-server/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js
blob: d9f0b09ed60778576b36acdeb1cba26946bad660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*!
 * socket.io-node
 * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
 * MIT Licensed
 */

(function (module, io, should) {

  module.exports = {
    
    'client version number': function () {
      io.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/);
    },

    'socket.io protocol version': function () {
      io.protocol.should().be.a('number');
      io.protocol.toString().should().match(/^\d+$/);
    },

    'socket.io available transports': function () {
      (io.transports.length > 0).should().be_true;
    }

  };

})(
    'undefined' == typeof module ? module = {} : module
  , 'undefined' == typeof io ? require('socket.io-client') : io
  , 'undefined' == typeof should ? require('should') : should
);