mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Fixed TS compilation in tests
This commit is contained in:
parent
60282281a3
commit
3e6aee47e5
4 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ describe('<Paginator />', () => {
|
|||
const paginator = {
|
||||
currentPage: 1,
|
||||
pagesCount: 5,
|
||||
totalItems: 10,
|
||||
};
|
||||
const extraPagesPrevNext = 2;
|
||||
const expectedItems = paginator.pagesCount + extraPagesPrevNext;
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
}));
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ describe('tagVisitsReducer', () => {
|
|||
pagination: {
|
||||
currentPage: 1,
|
||||
pagesCount: 1,
|
||||
totalItems: 1,
|
||||
},
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue