mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-10 13:35:47 +03:00
Fixed tests
This commit is contained in:
parent
5616d045ab
commit
bec755b121
9 changed files with 36 additions and 27 deletions
test/servers
|
@ -2,11 +2,11 @@ import React from 'react';
|
|||
import { shallow } from 'enzyme';
|
||||
import { identity } from 'ramda';
|
||||
import sinon from 'sinon';
|
||||
import CreateServer from '../../src/servers/CreateServer';
|
||||
import ImportServersBtn from '../../src/servers/helpers/ImportServersBtn';
|
||||
import createServerConstruct from '../../src/servers/CreateServer';
|
||||
|
||||
describe('<CreateServer />', () => {
|
||||
let wrapper;
|
||||
const ImportServersBtn = () => '';
|
||||
const createServerMock = sinon.fake();
|
||||
const historyMock = {
|
||||
push: sinon.fake(),
|
||||
|
@ -16,6 +16,8 @@ describe('<CreateServer />', () => {
|
|||
createServerMock.resetHistory();
|
||||
historyMock.push.resetHistory();
|
||||
|
||||
const CreateServer = createServerConstruct(ImportServersBtn);
|
||||
|
||||
wrapper = shallow(
|
||||
<CreateServer createServer={createServerMock} resetSelectedServer={identity} history={historyMock} />
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue