Add new connect form, closes #7
This commit is contained in:
parent
f502fea5c1
commit
6fd5235ec9
16 changed files with 524 additions and 231 deletions
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue