Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / socket.io / socket.io@1.4.8.js
476 bytesRaw
1 | ; |
2 | |
3 | var http = require('http'); |
4 | var io = require('socket.io')(); |
5 | io.on('connection', function () {}); |
6 | io.listen(3000); |
7 | |
8 | setTimeout(function () { |
9 | http.get('http://127.0.0.1:3000/socket.io/socket.io.js', function (res) { |
10 | var chunks = ''; |
11 | res.on('data', function (chunk) { |
12 | chunks += chunk.toString(); |
13 | }).on('end', function () { |
14 | if (chunks.indexOf('_dereq_') >= 0) { |
15 | console.log('ok'); |
16 | } |
17 | io.close(); |
18 | }); |
19 | }); |
20 | }, 100); |
21 |
Built with git-ssb-web