mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-21 14:06:19 +00:00
Move more components to shlink-web-component when applicable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { SimplePaginator } from '../../src/common/SimplePaginator';
|
||||
import { ELLIPSIS } from '../../src/utils/helpers/pagination';
|
||||
import { SimplePaginator } from '../../shlink-web-component/utils/components/SimplePaginator';
|
||||
import { ELLIPSIS } from '../../shlink-web-component/utils/helpers/pagination';
|
||||
|
||||
describe('<SimplePaginator />', () => {
|
||||
const setUp = (pagesCount: number, currentPage = 1) => render(
|
||||
|
||||
@@ -64,15 +64,4 @@ describe('HttpClient', () => {
|
||||
await expect(httpClient.fetchJson('')).rejects.toEqual(theError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('fetchBlob', () => {
|
||||
it('returns response as blob', async () => {
|
||||
const theBlob = new Blob();
|
||||
fetch.mockResolvedValue({ blob: () => theBlob });
|
||||
|
||||
const result = await httpClient.fetchBlob('');
|
||||
|
||||
expect(result).toEqual(theBlob);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { ImageDownloader } from '../../../shlink-web-component/utils/services/ImageDownloader';
|
||||
import type { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import { ImageDownloader } from '../../../src/common/services/ImageDownloader';
|
||||
import { windowMock } from '../../__mocks__/Window.mock';
|
||||
|
||||
describe('ImageDownloader', () => {
|
||||
|
||||
Reference in New Issue
Block a user