mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
25 lines
632 B
JavaScript
25 lines
632 B
JavaScript
/*
|
|
* routing-tabletest.js: Test for proxying `socket.io` and raw `WebSocket` requests using a ProxyTable.
|
|
*
|
|
* (C) 2010 Nodejitsu Inc.
|
|
* MIT LICENCE
|
|
*
|
|
*/
|
|
|
|
var vows = require('vows'),
|
|
macros = require('../macros'),
|
|
helpers = require('../helpers/index');
|
|
|
|
vows.describe(helpers.describe('routing-proxy', 'ws')).addBatch({
|
|
"With a valid target server": {
|
|
"and no latency": {
|
|
"using ws": macros.ws.assertProxied(),
|
|
"using socket.io": macros.ws.assertProxied({
|
|
raw: true
|
|
}),
|
|
},
|
|
// "and latency": macros.websocket.assertProxied({
|
|
// latency: 2000
|
|
// })
|
|
}
|
|
}).export(module); |