Permalink
Browse files

Fix test breakages due to WSS API changes.

  • Loading branch information...
1 parent bf4f9d7 commit 4dcf657ef12ff01017f54f8bd20ae00d9f92dcee @pgriess committed Dec 5, 2010
Showing with 6 additions and 7 deletions.
  1. +2 −3 test/test-basic.js
  2. +1 −1 test/test-readonly-attrs.js
  3. +1 −1 test/test-ready-state.js
  4. +1 −1 test/test-unix-send-fd.js
  5. +1 −1 test/test-unix-sockets.js
View
@@ -3,7 +3,7 @@
var assert = require('assert');
var WebSocket = require('../lib/websocket').WebSocket;
-var WebSocketServer = require('websocket-server/ws').Server;
+var WebSocketServer = require('websocket-server/ws/server').Server;
var PORT = 1024 + Math.floor(Math.random() * 4096);
var C_MSG = 'Client test: ' + (Math.random() * 100);
@@ -48,8 +48,7 @@ ws.addListener('data', function(buf) {
ws.close();
});
ws.onmessage = function(m) {
- assert.equal(m, S_MSG);
- assert.equal(typeof m, 'string');
+ assert.deepEqual(m, {data : S_MSG});
clientGotMessage = true;
};
@@ -3,7 +3,7 @@
var assert = require('assert');
var sys = require('sys');
var WebSocket = require('../lib/websocket').WebSocket;
-var WebSocketServer = require('websocket-server/ws').Server;
+var WebSocketServer = require('websocket-server/ws/server').Server;
var PORT = 1024 + Math.floor(Math.random() * 4096);
View
@@ -2,7 +2,7 @@
var assert = require('assert');
var WebSocket = require('../lib/websocket').WebSocket;
-var WebSocketServer = require('websocket-server/ws').Server;
+var WebSocketServer = require('websocket-server/ws/server').Server;
var PORT = 1024 + Math.floor(Math.random() * 4096);
@@ -6,7 +6,7 @@ var fs = require('fs');
var path = require('path');
var sys = require('sys');
var WebSocket = require('../lib/websocket').WebSocket;
-var WebSocketServer = require('websocket-server/ws').Server;
+var WebSocketServer = require('websocket-server/ws/server').Server;
var PATH = path.join(__dirname, 'sock.' + process.pid);
var C_MSG = 'Client test: ' + (Math.random() * 100);
@@ -5,7 +5,7 @@ var fs = require('fs');
var path = require('path');
var sys = require('sys');
var WebSocket = require('../lib/websocket').WebSocket;
-var WebSocketServer = require('websocket-server/ws').Server;
+var WebSocketServer = require('websocket-server/ws/server').Server;
var PATH = path.join(__dirname, 'sock.' + process.pid);
var S_MSG = 'Server test: ' + (Math.random() * 100);

0 comments on commit 4dcf657

Please sign in to comment.