Show last IRC connection error in status tab, log IRC connection errors

This commit is contained in:
Ken-Håvard Lieng 2017-07-02 03:31:00 +02:00
parent 786d8013b9
commit 18aff3ded6
19 changed files with 294 additions and 189 deletions

View file

@ -1,4 +1,26 @@
import { setServerName } from '../servers';
import { connect, setServerName } from '../servers';
describe('connect()', () => {
it('sets host and port correctly', () => {
expect(connect('cake.com:1881', '', {})).toMatchObject({
socket: {
data: {
host: 'cake.com',
port: '1881'
}
}
});
expect(connect('cake.com', '', {})).toMatchObject({
socket: {
data: {
host: 'cake.com',
port: undefined
}
}
});
});
});
describe('setServerName()', () => {
it('passes valid names to the server', () => {