Removed duplicated code on mercure-bound components

This commit is contained in:
Alejandro Celaya
2020-09-04 19:05:41 +02:00
parent 260ed3041a
commit f2e7a2161d
9 changed files with 71 additions and 92 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';
import { Mock } from 'ts-mockery';
import { RouteChildrenProps } from 'react-router';
import { RouteComponentProps } from 'react-router';
import createScrollToTop from '../../src/common/ScrollToTop';
describe('<ScrollToTop />', () => {
@@ -10,7 +10,7 @@ describe('<ScrollToTop />', () => {
beforeEach(() => {
const ScrollToTop = createScrollToTop();
wrapper = shallow(<ScrollToTop {...Mock.all<RouteChildrenProps>()}>Foobar</ScrollToTop>);
wrapper = shallow(<ScrollToTop {...Mock.all<RouteComponentProps>()}>Foobar</ScrollToTop>);
});
afterEach(() => wrapper.unmount());