Skip to content

Commit 67179ff

Browse files
test: fix
1 parent 2c67773 commit 67179ff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/server/servers/SockJSServer.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('SockJSServer', () => {
4848
socketServer.send(connection, 'hello world');
4949
setTimeout(() => {
5050
// the server closes the connection with the client
51-
socketServer.close(connection);
51+
socketServer.closeConnection(connection);
5252
}, 1000);
5353
});
5454

@@ -97,7 +97,7 @@ describe('SockJSServer', () => {
9797
socketServer.onConnection(cb);
9898

9999
expect(() => {
100-
socketServer.socket.emit('connection', null);
100+
socketServer.implementation.emit('connection', null);
101101
}).not.toThrow();
102102
expect(cb.mock.calls[0]).toEqual([null, null]);
103103
});
@@ -149,7 +149,7 @@ describe('SockJSServer', () => {
149149
socketServer.send(connection, 'hello world');
150150
setTimeout(() => {
151151
// the server closes the connection with the client
152-
socketServer.close(connection);
152+
socketServer.closeConnection(connection);
153153
}, 1000);
154154
});
155155

@@ -198,7 +198,7 @@ describe('SockJSServer', () => {
198198
socketServer.onConnection(cb);
199199

200200
expect(() => {
201-
socketServer.socket.emit('connection', null);
201+
socketServer.implementation.emit('connection', null);
202202
}).not.toThrow();
203203
expect(cb.mock.calls[0]).toEqual([null, null]);
204204
});

test/server/servers/WebsocketServer.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('WebsocketServer', () => {
4141
socketServer.send(connection, 'hello world');
4242
setTimeout(() => {
4343
// the server closes the connection with the client
44-
socketServer.close(connection);
44+
socketServer.closeConnection(connection);
4545
}, 1000);
4646
});
4747

0 commit comments

Comments
 (0)