Add new connect form, closes #7

This commit is contained in:
Ken-Håvard Lieng 2018-05-16 05:02:48 +02:00
parent f502fea5c1
commit 6fd5235ec9
16 changed files with 524 additions and 231 deletions

View file

@ -1,27 +1,5 @@
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', () => {
const name = 'cake';