Fixed tests

This commit is contained in:
Alejandro Celaya
2018-12-17 22:32:51 +01:00
parent 5616d045ab
commit bec755b121
9 changed files with 36 additions and 27 deletions

View File

@@ -1,12 +1,12 @@
import React from 'react';
import { shallow } from 'enzyme';
import { ShortUrlsComponent as ShortUrls } from '../../src/short-urls/ShortUrls';
import shortUrlsCreator from '../../src/short-urls/ShortUrls';
import Paginator from '../../src/short-urls/Paginator';
import ShortUrlsList from '../../src/short-urls/ShortUrlsList';
import SearchBar from '../../src/short-urls/SearchBar';
describe('<ShortUrlsList />', () => {
describe('<ShortUrls />', () => {
let wrapper;
const SearchBar = () => '';
const ShortUrlsList = () => '';
beforeEach(() => {
const params = {
@@ -14,6 +14,8 @@ describe('<ShortUrlsList />', () => {
page: '1',
};
const ShortUrls = shortUrlsCreator(SearchBar, ShortUrlsList);
wrapper = shallow(<ShortUrls match={{ params }} shortUrlsList={{ data: [] }} />);
});
afterEach(() => wrapper.unmount());