1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | (function (module, io, should) {
|
9 |
|
10 | module.exports = {
|
11 |
|
12 | 'client version number': function () {
|
13 | io.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/);
|
14 | },
|
15 |
|
16 | 'socket.io protocol version': function () {
|
17 | io.protocol.should().be.a('number');
|
18 | io.protocol.toString().should().match(/^\d+$/);
|
19 | },
|
20 |
|
21 | 'socket.io available transports': function () {
|
22 | (io.transports.length > 0).should().be_true;
|
23 | }
|
24 |
|
25 | };
|
26 |
|
27 | })(
|
28 | 'undefined' == typeof module ? module = {} : module
|
29 | , 'undefined' == typeof io ? require('socket.io-client') : io
|
30 | , 'undefined' == typeof should ? require('should') : should
|
31 | );
|