mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 22:01:52 +00:00
Add import type whenever possible
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FC, ReactElement } from 'react';
|
||||
import type { FC, ReactElement } from 'react';
|
||||
import { useToggle } from '../../src/utils/helpers/hooks';
|
||||
|
||||
interface RenderModalArgs {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ReactElement } from 'react';
|
||||
import type { ReactElement } from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkApiError, ShlinkApiErrorProps } from '../../src/api/ShlinkApiError';
|
||||
import { ErrorTypeV2, ErrorTypeV3, InvalidArgumentError, ProblemDetailsError } from '../../src/api/types/errors';
|
||||
import type { ShlinkApiErrorProps } from '../../src/api/ShlinkApiError';
|
||||
import { ShlinkApiError } from '../../src/api/ShlinkApiError';
|
||||
import type { InvalidArgumentError, ProblemDetailsError } from '../../src/api/types/errors';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../src/api/types/errors';
|
||||
|
||||
describe('<ShlinkApiError />', () => {
|
||||
const setUp = (props: ShlinkApiErrorProps) => render(<ShlinkApiError {...props} />);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { OptionalString } from '../../../src/utils/utils';
|
||||
import { ShlinkDomain, ShlinkVisits, ShlinkVisitsOverview } from '../../../src/api/types';
|
||||
import { ShortUrl, ShortUrlsOrder } from '../../../src/short-urls/data';
|
||||
import type { OptionalString } from '../../../src/utils/utils';
|
||||
import type { ShlinkDomain, ShlinkVisits, ShlinkVisitsOverview } from '../../../src/api/types';
|
||||
import type { ShortUrl, ShortUrlsOrder } from '../../../src/short-urls/data';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../../src/api/types/errors';
|
||||
import { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import type { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
|
||||
describe('ShlinkApiClient', () => {
|
||||
const fetchJson = jest.fn().mockResolvedValue({});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { buildShlinkApiClient } from '../../../src/api/services/ShlinkApiClientBuilder';
|
||||
import { ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import type { ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
|
||||
describe('ShlinkApiClientBuilder', () => {
|
||||
const server = (data: Partial<ReachableServer>) => Mock.of<ReachableServer>(data);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { Router } from 'react-router-dom';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import { App as createApp } from '../../src/app/App';
|
||||
|
||||
describe('<App />', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { AsideMenu as createAsideMenu } from '../../src/common/AsideMenu';
|
||||
import { ReachableServer } from '../../src/servers/data';
|
||||
import type { ReachableServer } from '../../src/servers/data';
|
||||
|
||||
describe('<AsideMenu />', () => {
|
||||
const AsideMenu = createAsideMenu(() => <>DeleteServerButton</>);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Home } from '../../src/common/Home';
|
||||
import { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
import type { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
|
||||
describe('<Home />', () => {
|
||||
const setUp = (servers: ServersMap = {}) => render(
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Router, useParams } from 'react-router-dom';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MenuLayout as createMenuLayout } from '../../src/common/MenuLayout';
|
||||
import { NonReachableServer, NotFoundServer, ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { SemVer } from '../../src/utils/helpers/version';
|
||||
import type { NonReachableServer, NotFoundServer, ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { SemVer } from '../../src/utils/helpers/version';
|
||||
|
||||
jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useParams: jest.fn() }));
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkVersions, ShlinkVersionsProps } from '../../src/common/ShlinkVersions';
|
||||
import { NonReachableServer, NotFoundServer, ReachableServer } from '../../src/servers/data';
|
||||
import type { ShlinkVersionsProps } from '../../src/common/ShlinkVersions';
|
||||
import { ShlinkVersions } from '../../src/common/ShlinkVersions';
|
||||
import type { NonReachableServer, NotFoundServer, ReachableServer } from '../../src/servers/data';
|
||||
|
||||
describe('<ShlinkVersions />', () => {
|
||||
const setUp = (props: ShlinkVersionsProps) => render(<ShlinkVersions {...props} />);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkVersionsContainer } from '../../src/common/ShlinkVersionsContainer';
|
||||
import { SelectedServer } from '../../src/servers/data';
|
||||
import { Sidebar } from '../../src/common/reducers/sidebar';
|
||||
import type { SelectedServer } from '../../src/servers/data';
|
||||
import type { Sidebar } from '../../src/common/reducers/sidebar';
|
||||
|
||||
describe('<ShlinkVersionsContainer />', () => {
|
||||
const setUp = (sidebar: Sidebar) => render(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { ShlinkLogo, ShlinkLogoProps } from '../../../src/common/img/ShlinkLogo';
|
||||
import type { ShlinkLogoProps } from '../../../src/common/img/ShlinkLogo';
|
||||
import { ShlinkLogo } from '../../../src/common/img/ShlinkLogo';
|
||||
import { MAIN_COLOR } from '../../../src/utils/theme';
|
||||
|
||||
describe('<ShlinkLogo />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ImageDownloader } from '../../../src/common/services/ImageDownloader';
|
||||
import { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import type { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import { windowMock } from '../../__mocks__/Window.mock';
|
||||
|
||||
describe('ImageDownloader', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ReportExporter } from '../../../src/common/services/ReportExporter';
|
||||
import { NormalizedVisit } from '../../../src/visits/types';
|
||||
import type { NormalizedVisit } from '../../../src/visits/types';
|
||||
import { windowMock } from '../../__mocks__/Window.mock';
|
||||
import { ExportableShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ExportableShortUrl } from '../../../src/short-urls/data';
|
||||
|
||||
describe('ReportExporter', () => {
|
||||
const jsonToCsv = jest.fn();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkDomainRedirects } from '../../src/api/types';
|
||||
import type { ShlinkDomainRedirects } from '../../src/api/types';
|
||||
import { DomainRow } from '../../src/domains/DomainRow';
|
||||
import { SelectedServer } from '../../src/servers/data';
|
||||
import { Domain } from '../../src/domains/data';
|
||||
import type { SelectedServer } from '../../src/servers/data';
|
||||
import type { Domain } from '../../src/domains/data';
|
||||
|
||||
describe('<DomainRow />', () => {
|
||||
const redirectsCombinations = [
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DomainSelector } from '../../src/domains/DomainSelector';
|
||||
import { DomainsList } from '../../src/domains/reducers/domainsList';
|
||||
import { ShlinkDomain } from '../../src/api/types';
|
||||
import type { DomainsList } from '../../src/domains/reducers/domainsList';
|
||||
import type { ShlinkDomain } from '../../src/api/types';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<DomainSelector />', () => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DomainsList } from '../../src/domains/reducers/domainsList';
|
||||
import type { DomainsList } from '../../src/domains/reducers/domainsList';
|
||||
import { ManageDomains } from '../../src/domains/ManageDomains';
|
||||
import { ShlinkDomain } from '../../src/api/types';
|
||||
import { SelectedServer } from '../../src/servers/data';
|
||||
import type { ShlinkDomain } from '../../src/api/types';
|
||||
import type { SelectedServer } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import { ProblemDetailsError } from '../../src/api/types/errors';
|
||||
import type { ProblemDetailsError } from '../../src/api/types/errors';
|
||||
|
||||
describe('<ManageDomains />', () => {
|
||||
const listDomains = jest.fn();
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen, waitForElementToBeRemoved } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { DomainDropdown } from '../../../src/domains/helpers/DomainDropdown';
|
||||
import { Domain } from '../../../src/domains/data';
|
||||
import { ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import { SemVer } from '../../../src/utils/helpers/version';
|
||||
import type { Domain } from '../../../src/domains/data';
|
||||
import type { ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import type { SemVer } from '../../../src/utils/helpers/version';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DomainDropdown />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DomainStatus } from '../../../src/domains/data';
|
||||
import type { DomainStatus } from '../../../src/domains/data';
|
||||
import { DomainStatusIcon } from '../../../src/domains/helpers/DomainStatusIcon';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkDomain } from '../../../src/api/types';
|
||||
import type { ShlinkDomain } from '../../../src/api/types';
|
||||
import { EditDomainRedirectsModal } from '../../../src/domains/helpers/EditDomainRedirectsModal';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { EditDomainRedirects, editDomainRedirects } from '../../../src/domains/reducers/domainRedirects';
|
||||
import { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { EditDomainRedirects } from '../../../src/domains/reducers/domainRedirects';
|
||||
import { editDomainRedirects } from '../../../src/domains/reducers/domainRedirects';
|
||||
import type { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
|
||||
describe('domainRedirectsReducer', () => {
|
||||
beforeEach(jest.clearAllMocks);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type {
|
||||
DomainsList } from '../../../src/domains/reducers/domainsList';
|
||||
import {
|
||||
DomainsList,
|
||||
replaceRedirectsOnDomain,
|
||||
replaceStatusOnDomain,
|
||||
domainsListReducerCreator,
|
||||
} from '../../../src/domains/reducers/domainsList';
|
||||
import { editDomainRedirects } from '../../../src/domains/reducers/domainRedirects';
|
||||
import { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { Domain } from '../../../src/domains/data';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import { SelectedServer, ServerData } from '../../../src/servers/data';
|
||||
import type { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { Domain } from '../../../src/domains/data';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { SelectedServer, ServerData } from '../../../src/servers/data';
|
||||
import { parseApiError } from '../../../src/api/utils';
|
||||
|
||||
describe('domainsListReducer', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { EventSourcePolyfill } from 'event-source-polyfill';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { identity } from 'ramda';
|
||||
import { bindToMercureTopic } from '../../../src/mercure/helpers';
|
||||
import { MercureInfo } from '../../../src/mercure/reducers/mercureInfo';
|
||||
import type { MercureInfo } from '../../../src/mercure/reducers/mercureInfo';
|
||||
|
||||
jest.mock('event-source-polyfill');
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { mercureInfoReducerCreator } from '../../../src/mercure/reducers/mercureInfo';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { GetState } from '../../../src/container/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { GetState } from '../../../src/container/types';
|
||||
|
||||
describe('mercureInfoReducer', () => {
|
||||
const mercureInfo = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { fireEvent, screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { CreateServer as createCreateServer } from '../../src/servers/CreateServer';
|
||||
import { ServerWithId } from '../../src/servers/data';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useNavigate: jest.fn() }));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ReactNode } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DeleteServerButton as createDeleteServerButton } from '../../src/servers/DeleteServerButton';
|
||||
import { ServerWithId } from '../../src/servers/data';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<DeleteServerButton />', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { DeleteServerModal } from '../../src/servers/DeleteServerModal';
|
||||
import { ServerWithId } from '../../src/servers/data';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import { TestModalWrapper } from '../__helpers__/TestModalWrapper';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { fireEvent, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter, useNavigate } from 'react-router-dom';
|
||||
import { EditServer as editServerConstruct } from '../../src/servers/EditServer';
|
||||
import { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useNavigate: jest.fn() }));
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import ServersExporter from '../../src/servers/services/ServersExporter';
|
||||
import type ServersExporter from '../../src/servers/services/ServersExporter';
|
||||
import { ManageServers as createManageServers } from '../../src/servers/ManageServers';
|
||||
import { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
import type { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ManageServers />', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ManageServersRow as createManageServersRow } from '../../src/servers/ManageServersRow';
|
||||
import { ServerWithId } from '../../src/servers/data';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
|
||||
describe('<ManageServersRow />', () => {
|
||||
const ManageServersRow = createManageServersRow(() => <span>ManageServersRowDropdown</span>);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ServerWithId } from '../../src/servers/data';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
import { ManageServersRowDropdown as createManageServersRowDropdown } from '../../src/servers/ManageServersRowDropdown';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ShortUrlsList as ShortUrlsListState } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import type { ShortUrlsList as ShortUrlsListState } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import { Overview as overviewCreator } from '../../src/servers/Overview';
|
||||
import { TagsList } from '../../src/tags/reducers/tagsList';
|
||||
import { VisitsOverview } from '../../src/visits/reducers/visitsOverview';
|
||||
import { MercureInfo } from '../../src/mercure/reducers/mercureInfo';
|
||||
import { ReachableServer } from '../../src/servers/data';
|
||||
import type { TagsList } from '../../src/tags/reducers/tagsList';
|
||||
import type { VisitsOverview } from '../../src/visits/reducers/visitsOverview';
|
||||
import type { MercureInfo } from '../../src/mercure/reducers/mercureInfo';
|
||||
import type { ReachableServer } from '../../src/servers/data';
|
||||
import { prettify } from '../../src/utils/helpers/numbers';
|
||||
|
||||
describe('<Overview />', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { values } from 'ramda';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ServersDropdown } from '../../src/servers/ServersDropdown';
|
||||
import { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
import type { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ServersDropdown />', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ServersListGroup } from '../../src/servers/ServersListGroup';
|
||||
import { ServerWithId } from '../../src/servers/data';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
|
||||
describe('<ServersListGroup />', () => {
|
||||
const servers = [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DuplicatedServersModal } from '../../../src/servers/helpers/DuplicatedServersModal';
|
||||
import { ServerData } from '../../../src/servers/data';
|
||||
import type { ServerData } from '../../../src/servers/data';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DuplicatedServersModal />', () => {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { ReactNode } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { HighlightCard, HighlightCardProps } from '../../../src/servers/helpers/HighlightCard';
|
||||
import type { HighlightCardProps } from '../../../src/servers/helpers/HighlightCard';
|
||||
import { HighlightCard } from '../../../src/servers/helpers/HighlightCard';
|
||||
|
||||
describe('<HighlightCard />', () => {
|
||||
const setUp = (props: HighlightCardProps & { children?: ReactNode }) => render(
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type {
|
||||
ImportServersBtnProps } from '../../../src/servers/helpers/ImportServersBtn';
|
||||
import {
|
||||
ImportServersBtn as createImportServersBtn,
|
||||
ImportServersBtnProps,
|
||||
} from '../../../src/servers/helpers/ImportServersBtn';
|
||||
import { ServersImporter } from '../../../src/servers/services/ServersImporter';
|
||||
import { ServersMap, ServerWithId } from '../../../src/servers/data';
|
||||
import type { ServersImporter } from '../../../src/servers/services/ServersImporter';
|
||||
import type { ServersMap, ServerWithId } from '../../../src/servers/data';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ImportServersBtn />', () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ServerError as createServerError } from '../../../src/servers/helpers/ServerError';
|
||||
import { NonReachableServer, NotFoundServer } from '../../../src/servers/data';
|
||||
import type { NonReachableServer, NotFoundServer } from '../../../src/servers/data';
|
||||
|
||||
describe('<ServerError />', () => {
|
||||
const ServerError = createServerError(() => null);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { fetchServers } from '../../../src/servers/reducers/remoteServers';
|
||||
import { createServers } from '../../../src/servers/reducers/servers';
|
||||
import { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
import type { HttpClient } from '../../../src/common/services/HttpClient';
|
||||
|
||||
describe('remoteServersReducer', () => {
|
||||
afterEach(jest.clearAllMocks);
|
||||
|
||||
@@ -8,9 +8,9 @@ import {
|
||||
MAX_FALLBACK_VERSION,
|
||||
MIN_FALLBACK_VERSION,
|
||||
} from '../../../src/servers/reducers/selectedServer';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import { NonReachableServer, NotFoundServer, ReachableServer, RegularServer } from '../../../src/servers/data';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { NonReachableServer, NotFoundServer, ReachableServer, RegularServer } from '../../../src/servers/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
|
||||
describe('selectedServerReducer', () => {
|
||||
const dispatch = jest.fn();
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
setAutoConnect,
|
||||
serversReducer,
|
||||
} from '../../../src/servers/reducers/servers';
|
||||
import { RegularServer } from '../../../src/servers/data';
|
||||
import type { RegularServer } from '../../../src/servers/data';
|
||||
|
||||
describe('serversReducer', () => {
|
||||
const list = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import ServersExporter from '../../../src/servers/services/ServersExporter';
|
||||
import { LocalStorage } from '../../../src/utils/services/LocalStorage';
|
||||
import type { LocalStorage } from '../../../src/utils/services/LocalStorage';
|
||||
import { appendChild, removeChild, windowMock } from '../../__mocks__/Window.mock';
|
||||
|
||||
describe('ServersExporter', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ServersImporter } from '../../../src/servers/services/ServersImporter';
|
||||
import { RegularServer } from '../../../src/servers/data';
|
||||
import type { RegularServer } from '../../../src/servers/data';
|
||||
|
||||
describe('ServersImporter', () => {
|
||||
const servers: RegularServer[] = [Mock.all<RegularServer>(), Mock.all<RegularServer>()];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import {
|
||||
import type {
|
||||
RealTimeUpdatesSettings as RealTimeUpdatesSettingsOptions,
|
||||
Settings,
|
||||
} from '../../src/settings/reducers/settings';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlCreationSettings as ShortUrlsSettings, Settings } from '../../src/settings/reducers/settings';
|
||||
import type { ShortUrlCreationSettings as ShortUrlsSettings, Settings } from '../../src/settings/reducers/settings';
|
||||
import { ShortUrlCreationSettings } from '../../src/settings/ShortUrlCreationSettings';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Settings, ShortUrlsListSettings as ShortUrlsSettings } from '../../src/settings/reducers/settings';
|
||||
import type { Settings, ShortUrlsListSettings as ShortUrlsSettings } from '../../src/settings/reducers/settings';
|
||||
import { ShortUrlsListSettings } from '../../src/settings/ShortUrlsListSettings';
|
||||
import { ShortUrlsOrder } from '../../src/short-urls/data';
|
||||
import type { ShortUrlsOrder } from '../../src/short-urls/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlsListSettings />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Settings, TagsSettings as TagsSettingsOptions } from '../../src/settings/reducers/settings';
|
||||
import type { Settings, TagsSettings as TagsSettingsOptions } from '../../src/settings/reducers/settings';
|
||||
import { TagsSettings } from '../../src/settings/TagsSettings';
|
||||
import { TagsOrder } from '../../src/tags/data/TagsListChildrenProps';
|
||||
import type { TagsOrder } from '../../src/tags/data/TagsListChildrenProps';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<TagsSettings />', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Settings, UiSettings } from '../../src/settings/reducers/settings';
|
||||
import type { Settings, UiSettings } from '../../src/settings/reducers/settings';
|
||||
import { UserInterfaceSettings } from '../../src/settings/UserInterfaceSettings';
|
||||
import { Theme } from '../../src/utils/theme';
|
||||
import type { Theme } from '../../src/utils/theme';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<UserInterfaceSettings />', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import { VisitsSettings } from '../../src/settings/VisitsSettings';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { migrateDeprecatedSettings } from '../../../src/settings/helpers';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('settings-helpers', () => {
|
||||
describe('migrateDeprecatedSettings', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { CreateShortUrl as createShortUrlsCreator } from '../../src/short-urls/CreateShortUrl';
|
||||
import { ShortUrlCreation } from '../../src/short-urls/reducers/shortUrlCreation';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { ShortUrlCreation } from '../../src/short-urls/reducers/shortUrlCreation';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
|
||||
describe('<CreateShortUrl />', () => {
|
||||
const ShortUrlForm = () => <span>ShortUrlForm</span>;
|
||||
|
||||
@@ -2,10 +2,10 @@ import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { EditShortUrl as createEditShortUrl } from '../../src/short-urls/EditShortUrl';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import { ShortUrlDetail } from '../../src/short-urls/reducers/shortUrlDetail';
|
||||
import { ShortUrlEdition } from '../../src/short-urls/reducers/shortUrlEdition';
|
||||
import { ShortUrl } from '../../src/short-urls/data';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { ShortUrlDetail } from '../../src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrlEdition } from '../../src/short-urls/reducers/shortUrlEdition';
|
||||
import type { ShortUrl } from '../../src/short-urls/data';
|
||||
|
||||
describe('<EditShortUrl />', () => {
|
||||
const shortUrlCreation = { validateUrls: true };
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Paginator } from '../../src/short-urls/Paginator';
|
||||
import { ShlinkPaginator } from '../../src/api/types';
|
||||
import type { ShlinkPaginator } from '../../src/api/types';
|
||||
import { ELLIPSIS } from '../../src/utils/helpers/pagination';
|
||||
|
||||
describe('<Paginator />', () => {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { UserEvent } from '@testing-library/user-event/setup/setup';
|
||||
import type { UserEvent } from '@testing-library/user-event/setup/setup';
|
||||
import { formatISO } from 'date-fns';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlForm as createShortUrlForm, Mode } from '../../src/short-urls/ShortUrlForm';
|
||||
import { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { Mode } from '../../src/short-urls/ShortUrlForm';
|
||||
import { ShortUrlForm as createShortUrlForm } from '../../src/short-urls/ShortUrlForm';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { parseDate } from '../../src/utils/helpers/date';
|
||||
import { OptionalString } from '../../src/utils/utils';
|
||||
import type { OptionalString } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlForm />', () => {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { Mock } from 'ts-mockery';
|
||||
import { endOfDay, formatISO, startOfDay } from 'date-fns';
|
||||
import { MemoryRouter, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { ShortUrlsFilteringBar as filteringBarCreator } from '../../src/short-urls/ShortUrlsFilteringBar';
|
||||
import { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import { DateRange } from '../../src/utils/helpers/dateIntervals';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { DateRange } from '../../src/utils/helpers/dateIntervals';
|
||||
import { formatDate } from '../../src/utils/helpers/date';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter, useNavigate } from 'react-router-dom';
|
||||
import { ShortUrlsList as createShortUrlsList } from '../../src/short-urls/ShortUrlsList';
|
||||
import { ShortUrl, ShortUrlsOrder } from '../../src/short-urls/data';
|
||||
import { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub';
|
||||
import { ShortUrlsList as ShortUrlsListModel } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import { ReachableServer } from '../../src/servers/data';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import { ShortUrlsTableType } from '../../src/short-urls/ShortUrlsTable';
|
||||
import type { ShortUrl, ShortUrlsOrder } from '../../src/short-urls/data';
|
||||
import type { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub';
|
||||
import type { ShortUrlsList as ShortUrlsListModel } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import type { ReachableServer } from '../../src/servers/data';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { ShortUrlsTableType } from '../../src/short-urls/ShortUrlsTable';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import { SemVer } from '../../src/utils/helpers/version';
|
||||
import type { SemVer } from '../../src/utils/helpers/version';
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
...jest.requireActual('react-router-dom'),
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlsTable as shortUrlsTableCreator } from '../../src/short-urls/ShortUrlsTable';
|
||||
import { ShortUrlsList } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import { ShortUrlsOrderableFields, SHORT_URLS_ORDERABLE_FIELDS } from '../../src/short-urls/data';
|
||||
import type { ShortUrlsList } from '../../src/short-urls/reducers/shortUrlsList';
|
||||
import type { ReachableServer, SelectedServer } from '../../src/servers/data';
|
||||
import type { ShortUrlsOrderableFields } from '../../src/short-urls/data';
|
||||
import { SHORT_URLS_ORDERABLE_FIELDS } from '../../src/short-urls/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlsTable />', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { CreateShortUrlResult as createResult } from '../../../src/short-urls/helpers/CreateShortUrlResult';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { ShortUrlCreation } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import type { ShortUrlCreation } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
|
||||
describe('<CreateShortUrlResult />', () => {
|
||||
const copyToClipboard = jest.fn();
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DeleteShortUrlModal } from '../../../src/short-urls/helpers/DeleteShortUrlModal';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ShortUrlDeletion } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShortUrlDeletion } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { ErrorTypeV2, ErrorTypeV3, InvalidShortUrlDeletion, ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
import type { InvalidShortUrlDeletion, ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
import { ErrorTypeV2, ErrorTypeV3 } from '../../../src/api/types/errors';
|
||||
import { TestModalWrapper } from '../../__helpers__/TestModalWrapper';
|
||||
|
||||
describe('<DeleteShortUrlModal />', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ReportExporter } from '../../../src/common/services/ReportExporter';
|
||||
import type { ReportExporter } from '../../../src/common/services/ReportExporter';
|
||||
import { ExportShortUrlsBtn as createExportShortUrlsBtn } from '../../../src/short-urls/helpers/ExportShortUrlsBtn';
|
||||
import { NotFoundServer, ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import type { NotFoundServer, ReachableServer, SelectedServer } from '../../../src/servers/data';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ExportShortUrlsBtn />', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { fireEvent, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { QrCodeModal as createQrCodeModal } from '../../../src/short-urls/helpers/QrCodeModal';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ReachableServer } from '../../../src/servers/data';
|
||||
import { SemVer } from '../../../src/utils/helpers/version';
|
||||
import { ImageDownloader } from '../../../src/common/services/ImageDownloader';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import type { SemVer } from '../../../src/utils/helpers/version';
|
||||
import type { ImageDownloader } from '../../../src/common/services/ImageDownloader';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<QrCodeModal />', () => {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ShortUrlDetailLink, LinkSuffix } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { NotFoundServer, ReachableServer } from '../../../src/servers/data';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { LinkSuffix } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import { ShortUrlDetailLink } from '../../../src/short-urls/helpers/ShortUrlDetailLink';
|
||||
import type { NotFoundServer, ReachableServer } from '../../../src/servers/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
|
||||
describe('<ShortUrlDetailLink />', () => {
|
||||
it.each([
|
||||
|
||||
@@ -2,7 +2,7 @@ import userEvent from '@testing-library/user-event';
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlStatus } from '../../../src/short-urls/helpers/ShortUrlStatus';
|
||||
import { ShortUrl, ShortUrlMeta, ShortUrlVisitsSummary } from '../../../src/short-urls/data';
|
||||
import type { ShortUrl, ShortUrlMeta, ShortUrlVisitsSummary } from '../../../src/short-urls/data';
|
||||
|
||||
describe('<ShortUrlStatus />', () => {
|
||||
const setUp = (shortUrl: ShortUrl) => ({
|
||||
|
||||
@@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlVisitsCount } from '../../../src/short-urls/helpers/ShortUrlVisitsCount';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
|
||||
describe('<ShortUrlVisitsCount />', () => {
|
||||
const setUp = (visitsCount: number, shortUrl: ShortUrl) => ({
|
||||
|
||||
@@ -4,13 +4,13 @@ import { Mock } from 'ts-mockery';
|
||||
import { addDays, formatISO, subDays } from 'date-fns';
|
||||
import { MemoryRouter, useLocation } from 'react-router-dom';
|
||||
import { ShortUrlsRow as createShortUrlsRow } from '../../../src/short-urls/helpers/ShortUrlsRow';
|
||||
import { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import { ShortUrl, ShortUrlMeta } from '../../../src/short-urls/data';
|
||||
import { Settings } from '../../../src/settings/reducers/settings';
|
||||
import { ReachableServer } from '../../../src/servers/data';
|
||||
import type { TimeoutToggle } from '../../../src/utils/helpers/hooks';
|
||||
import type { ShortUrl, ShortUrlMeta } from '../../../src/short-urls/data';
|
||||
import type { Settings } from '../../../src/settings/reducers/settings';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import { parseDate, now } from '../../../src/utils/helpers/date';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { OptionalString } from '../../../src/utils/utils';
|
||||
import type { OptionalString } from '../../../src/utils/utils';
|
||||
import { colorGeneratorMock } from '../../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
interface SetUpOptions {
|
||||
|
||||
@@ -2,8 +2,8 @@ import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ShortUrlsRowMenu as createShortUrlsRowMenu } from '../../../src/short-urls/helpers/ShortUrlsRowMenu';
|
||||
import { ReachableServer } from '../../../src/servers/data';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ReachableServer } from '../../../src/servers/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ShortUrlsRowMenu />', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { shortUrlDataFromShortUrl, urlDecodeShortCode, urlEncodeShortCode } from '../../../src/short-urls/helpers';
|
||||
|
||||
describe('helpers', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { QrErrorCorrection } from '../../../../src/utils/helpers/qrCodes';
|
||||
import type { QrErrorCorrection } from '../../../../src/utils/helpers/qrCodes';
|
||||
import { QrErrorCorrectionDropdown } from '../../../../src/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown';
|
||||
import { renderWithEvents } from '../../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { QrCodeFormat } from '../../../../src/utils/helpers/qrCodes';
|
||||
import type { QrCodeFormat } from '../../../../src/utils/helpers/qrCodes';
|
||||
import { QrFormatDropdown } from '../../../../src/short-urls/helpers/qr-codes/QrFormatDropdown';
|
||||
import { renderWithEvents } from '../../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type {
|
||||
CreateShortUrlAction } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import {
|
||||
CreateShortUrlAction,
|
||||
shortUrlCreationReducerCreator,
|
||||
createShortUrl as createShortUrlCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('shortUrlCreationReducer', () => {
|
||||
const shortUrl = Mock.of<ShortUrl>();
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
shortUrlDeletionReducerCreator,
|
||||
deleteShortUrl as deleteShortUrlCretor,
|
||||
} from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
|
||||
describe('shortUrlDeletionReducer', () => {
|
||||
const deleteShortUrlCall = jest.fn();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ShortUrlDetailAction, shortUrlDetailReducerCreator } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import { ShortUrlsList } from '../../../src/short-urls/reducers/shortUrlsList';
|
||||
import type { ShortUrlDetailAction } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import { shortUrlDetailReducerCreator } from '../../../src/short-urls/reducers/shortUrlDetail';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrlsList } from '../../../src/short-urls/reducers/shortUrlsList';
|
||||
|
||||
describe('shortUrlDetailReducer', () => {
|
||||
const getShortUrlCall = jest.fn();
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type {
|
||||
ShortUrlEditedAction } from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import {
|
||||
ShortUrlEditedAction,
|
||||
shortUrlEditionReducerCreator,
|
||||
editShortUrl as editShortUrlCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { SelectedServer } from '../../../src/servers/data';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { SelectedServer } from '../../../src/servers/data';
|
||||
|
||||
describe('shortUrlEditionReducer', () => {
|
||||
const longUrl = 'https://shlink.io';
|
||||
|
||||
@@ -4,12 +4,12 @@ import {
|
||||
shortUrlsListReducerCreator,
|
||||
} from '../../../src/short-urls/reducers/shortUrlsList';
|
||||
import { shortUrlDeleted } from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
import { ShlinkPaginator, ShlinkShortUrlsResponse } from '../../../src/api/types';
|
||||
import type { ShlinkPaginator, ShlinkShortUrlsResponse } from '../../../src/api/types';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import { editShortUrl as editShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlEdition';
|
||||
import { createNewVisits } from '../../../src/visits/reducers/visitCreation';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
|
||||
describe('shortUrlsListReducer', () => {
|
||||
const shortCode = 'abc123';
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { identity } from 'ramda';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { TagsList as createTagsList, TagsListProps } from '../../src/tags/TagsList';
|
||||
import { TagsList } from '../../src/tags/reducers/tagsList';
|
||||
import { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import type { TagsListProps } from '../../src/tags/TagsList';
|
||||
import { TagsList as createTagsList } from '../../src/tags/TagsList';
|
||||
import type { TagsList } from '../../src/tags/reducers/tagsList';
|
||||
import type { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub';
|
||||
import type { Settings } from '../../src/settings/reducers/settings';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<TagsList />', () => {
|
||||
|
||||
@@ -2,9 +2,9 @@ import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { TagsTable as createTagsTable } from '../../src/tags/TagsTable';
|
||||
import { SelectedServer } from '../../src/servers/data';
|
||||
import type { SelectedServer } from '../../src/servers/data';
|
||||
import { rangeOf } from '../../src/utils/utils';
|
||||
import { NormalizedTag } from '../../src/tags/data';
|
||||
import type { NormalizedTag } from '../../src/tags/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useLocation: jest.fn() }));
|
||||
|
||||
@@ -2,7 +2,7 @@ import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { TagsTableRow as createTagsTableRow } from '../../src/tags/TagsTableRow';
|
||||
import { ReachableServer } from '../../src/servers/data';
|
||||
import type { ReachableServer } from '../../src/servers/data';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import { colorGeneratorMock } from '../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { DeleteTagConfirmModal } from '../../../src/tags/helpers/DeleteTagConfirmModal';
|
||||
import { TagDeletion } from '../../../src/tags/reducers/tagDelete';
|
||||
import type { TagDeletion } from '../../../src/tags/reducers/tagDelete';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DeleteTagConfirmModal />', () => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { TagEdition } from '../../../src/tags/reducers/tagEdit';
|
||||
import type { TagEdition } from '../../../src/tags/reducers/tagEdit';
|
||||
import { EditTagModal as createEditTagModal } from '../../../src/tags/helpers/EditTagModal';
|
||||
import { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import type { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
import type { ProblemDetailsError } from '../../../src/api/types/errors';
|
||||
|
||||
describe('<EditTagModal />', () => {
|
||||
const EditTagModal = createEditTagModal(Mock.of<ColorGenerator>({ getColorForKey: jest.fn(() => 'green') }));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ReactNode } from 'react';
|
||||
import { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import type { ReactNode } from 'react';
|
||||
import type { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import { MAIN_COLOR } from '../../../src/utils/theme';
|
||||
import { Tag } from '../../../src/tags/helpers/Tag';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { TagsSelector as createTagsSelector } from '../../../src/tags/helpers/TagsSelector';
|
||||
import { TagsList } from '../../../src/tags/reducers/tagsList';
|
||||
import { Settings } from '../../../src/settings/reducers/settings';
|
||||
import type { TagsList } from '../../../src/tags/reducers/tagsList';
|
||||
import type { Settings } from '../../../src/settings/reducers/settings';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
import { colorGeneratorMock } from '../../utils/services/__mocks__/ColorGenerator.mock';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { tagDeleted, tagDeleteReducerCreator } from '../../../src/tags/reducers/tagDelete';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('tagDeleteReducer', () => {
|
||||
const deleteTagsCall = jest.fn();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { tagEdited, editTag as editTagCreator, EditTagAction, tagEditReducerCreator } from '../../../src/tags/reducers/tagEdit';
|
||||
import { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import type { EditTagAction } from '../../../src/tags/reducers/tagEdit';
|
||||
import { tagEdited, editTag as editTagCreator, tagEditReducerCreator } from '../../../src/tags/reducers/tagEdit';
|
||||
import type { ShlinkApiClient } from '../../../src/api/services/ShlinkApiClient';
|
||||
import type { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
|
||||
describe('tagEditReducer', () => {
|
||||
const oldName = 'foo';
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type {
|
||||
TagsList } from '../../../src/tags/reducers/tagsList';
|
||||
import {
|
||||
TagsList,
|
||||
filterTags,
|
||||
listTags as listTagsCreator,
|
||||
tagsListReducerCreator,
|
||||
} from '../../../src/tags/reducers/tagsList';
|
||||
import { ShlinkState } from '../../../src/container/types';
|
||||
import { ShortUrl } from '../../../src/short-urls/data';
|
||||
import type { ShlinkState } from '../../../src/container/types';
|
||||
import type { ShortUrl } from '../../../src/short-urls/data';
|
||||
import { createShortUrl as createShortUrlCreator } from '../../../src/short-urls/reducers/shortUrlCreation';
|
||||
import { tagEdited } from '../../../src/tags/reducers/tagEdit';
|
||||
import { tagDeleted } from '../../../src/tags/reducers/tagDelete';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { DropdownBtn, DropdownBtnProps } from '../../src/utils/DropdownBtn';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { DropdownBtnProps } from '../../src/utils/DropdownBtn';
|
||||
import { DropdownBtn } from '../../src/utils/DropdownBtn';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<DropdownBtn />', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DropdownBtnMenu, DropdownBtnMenuProps } from '../../src/utils/DropdownBtnMenu';
|
||||
import type { DropdownBtnMenuProps } from '../../src/utils/DropdownBtnMenu';
|
||||
import { DropdownBtnMenu } from '../../src/utils/DropdownBtnMenu';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<DropdownBtnMenu />', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Placement } from '@popperjs/core';
|
||||
import { InfoTooltip, InfoTooltipProps } from '../../src/utils/InfoTooltip';
|
||||
import type { Placement } from '@popperjs/core';
|
||||
import type { InfoTooltipProps } from '../../src/utils/InfoTooltip';
|
||||
import { InfoTooltip } from '../../src/utils/InfoTooltip';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<InfoTooltip />', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { Message, MessageProps } from '../../src/utils/Message';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { MessageProps } from '../../src/utils/Message';
|
||||
import { Message } from '../../src/utils/Message';
|
||||
|
||||
describe('<Message />', () => {
|
||||
const setUp = (props: PropsWithChildren<MessageProps> = {}) => render(<Message {...props} />);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { values } from 'ramda';
|
||||
import { OrderingDropdown, OrderingDropdownProps } from '../../src/utils/OrderingDropdown';
|
||||
import { OrderDir } from '../../src/utils/helpers/ordering';
|
||||
import type { OrderingDropdownProps } from '../../src/utils/OrderingDropdown';
|
||||
import { OrderingDropdown } from '../../src/utils/OrderingDropdown';
|
||||
import type { OrderDir } from '../../src/utils/helpers/ordering';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<OrderingDropdown />', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { Result, ResultProps, ResultType } from '../../src/utils/Result';
|
||||
import type { ResultProps, ResultType } from '../../src/utils/Result';
|
||||
import { Result } from '../../src/utils/Result';
|
||||
|
||||
describe('<Result />', () => {
|
||||
const setUp = (props: ResultProps) => render(<Result {...props} />);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { parseISO } from 'date-fns';
|
||||
import { DateInput, DateInputProps } from '../../../src/utils/dates/DateInput';
|
||||
import type { DateInputProps } from '../../../src/utils/dates/DateInput';
|
||||
import { DateInput } from '../../../src/utils/dates/DateInput';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DateInput />', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { DateIntervalDropdownItems } from '../../../src/utils/dates/DateIntervalDropdownItems';
|
||||
import { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from '../../../src/utils/helpers/dateIntervals';
|
||||
import type { DateInterval } from '../../../src/utils/helpers/dateIntervals';
|
||||
import { DATE_INTERVALS, rangeOrIntervalToString } from '../../../src/utils/helpers/dateIntervals';
|
||||
import { DropdownBtn } from '../../../src/utils/DropdownBtn';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { DateInterval, rangeOrIntervalToString } from '../../../src/utils/helpers/dateIntervals';
|
||||
import type { DateInterval } from '../../../src/utils/helpers/dateIntervals';
|
||||
import { rangeOrIntervalToString } from '../../../src/utils/helpers/dateIntervals';
|
||||
import { DateIntervalSelector } from '../../../src/utils/dates/DateIntervalSelector';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { DateRangeSelector, DateRangeSelectorProps } from '../../../src/utils/dates/DateRangeSelector';
|
||||
import { DateInterval } from '../../../src/utils/helpers/dateIntervals';
|
||||
import type { DateRangeSelectorProps } from '../../../src/utils/dates/DateRangeSelector';
|
||||
import { DateRangeSelector } from '../../../src/utils/dates/DateRangeSelector';
|
||||
import type { DateInterval } from '../../../src/utils/helpers/dateIntervals';
|
||||
import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<DateRangeSelector />', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { TimeProps, Time } from '../../../src/utils/dates/Time';
|
||||
import type { TimeProps } from '../../../src/utils/dates/Time';
|
||||
import { Time } from '../../../src/utils/dates/Time';
|
||||
import { parseDate } from '../../../src/utils/helpers/date';
|
||||
|
||||
describe('<Time />', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { endOfDay, format, formatISO, startOfDay, subDays } from 'date-fns';
|
||||
import type {
|
||||
DateInterval } from '../../../src/utils/helpers/dateIntervals';
|
||||
import {
|
||||
DateInterval,
|
||||
dateRangeIsEmpty,
|
||||
dateToMatchingInterval,
|
||||
intervalToDateRange,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { determineOrderDir, OrderDir, orderToString, stringToOrder } from '../../../src/utils/helpers/ordering';
|
||||
import type { OrderDir } from '../../../src/utils/helpers/ordering';
|
||||
import { determineOrderDir, orderToString, stringToOrder } from '../../../src/utils/helpers/ordering';
|
||||
|
||||
describe('ordering', () => {
|
||||
describe('determineOrderDir', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { buildQrCodeUrl, QrCodeFormat, QrErrorCorrection } from '../../../src/utils/helpers/qrCodes';
|
||||
import type { QrCodeFormat, QrErrorCorrection } from '../../../src/utils/helpers/qrCodes';
|
||||
import { buildQrCodeUrl } from '../../../src/utils/helpers/qrCodes';
|
||||
|
||||
describe('qrCodes', () => {
|
||||
describe('buildQrCodeUrl', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { SemVer, versionMatch, Versions } from '../../../src/utils/helpers/version';
|
||||
import { Empty } from '../../../src/utils/utils';
|
||||
import type { SemVer, Versions } from '../../../src/utils/helpers/version';
|
||||
import { versionMatch } from '../../../src/utils/helpers/version';
|
||||
import type { Empty } from '../../../src/utils/utils';
|
||||
|
||||
describe('version', () => {
|
||||
describe('versionMatch', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
|
||||
import { LocalStorage } from '../../../src/utils/services/LocalStorage';
|
||||
import type { LocalStorage } from '../../../src/utils/services/LocalStorage';
|
||||
import { MAIN_COLOR } from '../../../src/utils/theme';
|
||||
|
||||
describe('ColorGenerator', () => {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user