mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-28 20:56:42 +00:00
Fixed tests
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
import { identity } from 'ramda';
|
||||
import React from 'react';
|
||||
import { ServersDropdown } from '../../src/servers/ServersDropdown';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
describe('ServersDropdown', () => {
|
||||
describe('<ServersDropdown />', () => {
|
||||
let wrapped;
|
||||
const servers = [{ name: 'foo' }, { name: 'bar' }, { name: 'baz' }];
|
||||
const servers = [{ name: 'foo', id: 1 }, { name: 'bar', id: 2 }, { name: 'baz', id: 3 }];
|
||||
|
||||
beforeEach(() => {
|
||||
wrapped = shallow(<ServersDropdown servers={servers} />);
|
||||
});
|
||||
afterEach(() => {
|
||||
wrapped.unmount();
|
||||
wrapped = shallow(<ServersDropdown servers={servers} listServers={identity} />);
|
||||
});
|
||||
afterEach(() => wrapped.unmount());
|
||||
|
||||
it('contains the list of servers', () => {
|
||||
expect(wrapped.find('DropdownItem').length).toEqual(servers.length);
|
||||
|
||||
Reference in New Issue
Block a user