mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Update tests
This commit is contained in:
@@ -84,22 +84,4 @@ describe('MessageReceiver', function() {
|
||||
var messageReceiver = new textsecure.MessageReceiver('ws://localhost:8080', window);
|
||||
});
|
||||
});
|
||||
|
||||
describe('keepalives', function() {
|
||||
it('sends a keepalive once a minute', function(done) {
|
||||
this.timeout(60000);
|
||||
var mockServer = new MockServer('ws://localhost:8081/v1/websocket/?login='+ encodeURIComponent(number) +'.1&password=password');
|
||||
mockServer.on('connection', function(server) {
|
||||
server.on('message', function(data) {
|
||||
var message = textsecure.protobuf.WebSocketMessage.decode(data);
|
||||
assert.strictEqual(message.type, textsecure.protobuf.WebSocketMessage.Type.REQUEST);
|
||||
assert.strictEqual(message.request.verb, 'GET');
|
||||
assert.strictEqual(message.request.path, '/v1/keepalive');
|
||||
server.close();
|
||||
done();
|
||||
});
|
||||
});
|
||||
var messageReceiver = new textsecure.MessageReceiver('ws://localhost:8081', window);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user