diff options
| author | Jules Laplace <jules@okfoc.us> | 2012-09-24 16:22:07 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2012-09-24 16:22:07 -0400 |
| commit | 686106d544ecc3b6ffd4db2b665d3bc879a58d8c (patch) | |
| tree | a5b5e50237cef70e12f0745371896e96f5f6d578 /node_modules/socket.io-client/test/io.test.js | |
ok
Diffstat (limited to 'node_modules/socket.io-client/test/io.test.js')
| -rw-r--r-- | node_modules/socket.io-client/test/io.test.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/socket.io-client/test/io.test.js b/node_modules/socket.io-client/test/io.test.js new file mode 100644 index 0000000..d9f0b09 --- /dev/null +++ b/node_modules/socket.io-client/test/io.test.js @@ -0,0 +1,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 +); |
