fix(core): update

This commit is contained in:
2022-01-20 16:50:25 +01:00
parent 608669ec44
commit 7c98e19988
5 changed files with 73 additions and 60 deletions

View File

@ -117,15 +117,16 @@ tap.test('should be able to make a functionCall from server to client', async ()
expect(response.hi).to.equal('hi there from server');
});
tap.test('client should disconnect and reconnect', async (tools) => {
tap.test('client should disconnect and reconnect', async (toolsArg) => {
await testSmartsocketClient.disconnect();
await testSmartsocketClient.connect();
await toolsArg.delayFor(2000);
expect(testSmartsocket.socketConnections.getArray().length).to.equal(1);
});
// class smartsocket
tap.test('should be able to switch to a new server', async (toolsArg) => {
await testSmartsocket.stop();
await toolsArg.delayFor(5000);
testSmartsocket = new smartsocket.Smartsocket({ alias: 'testserver2', port: testConfig.port });
await testSmartsocket.start();
await toolsArg.delayFor(30000);