Fixed TS compilation in tests

This commit is contained in:
Alejandro Celaya 2020-12-08 19:31:09 +01:00
parent 60282281a3
commit 3e6aee47e5
4 changed files with 6 additions and 2 deletions

View file

@ -11,11 +11,11 @@ import './CreateShortUrlResult.scss';
export interface CreateShortUrlResultProps extends ShortUrlCreation {
resetCreateShortUrl: () => void;
canBeClosed: boolean;
canBeClosed?: boolean;
}
const CreateShortUrlResult = (useStateFlagTimeout: StateFlagTimeout) => (
{ error, result, resetCreateShortUrl, canBeClosed }: CreateShortUrlResultProps,
{ error, result, resetCreateShortUrl, canBeClosed = false }: CreateShortUrlResultProps,
) => {
const [ showCopyTooltip, setShowCopyTooltip ] = useStateFlagTimeout();

View file

@ -16,6 +16,7 @@ describe('<Paginator />', () => {
const paginator = {
currentPage: 1,
pagesCount: 5,
totalItems: 10,
};
const extraPagesPrevNext = 2;
const expectedItems = paginator.pagesCount + extraPagesPrevNext;

View file

@ -125,6 +125,7 @@ describe('shortUrlVisitsReducer', () => {
pagination: {
currentPage: 1,
pagesCount: 1,
totalItems: 1,
},
}));
@ -144,6 +145,7 @@ describe('shortUrlVisitsReducer', () => {
pagination: {
currentPage: page,
pagesCount: expectedRequests,
totalItems: 1,
},
}));

View file

@ -124,6 +124,7 @@ describe('tagVisitsReducer', () => {
pagination: {
currentPage: 1,
pagesCount: 1,
totalItems: 1,
},
}));