diff --git a/test/__mocks__/setUpTest.ts b/test/__helpers__/setUpTest.ts similarity index 100% rename from test/__mocks__/setUpTest.ts rename to test/__helpers__/setUpTest.ts diff --git a/test/common/AppUpdateBanner.test.tsx b/test/common/AppUpdateBanner.test.tsx index 0dfa0e14..4dfcd207 100644 --- a/test/common/AppUpdateBanner.test.tsx +++ b/test/common/AppUpdateBanner.test.tsx @@ -1,6 +1,6 @@ import { screen } from '@testing-library/react'; import { AppUpdateBanner } from '../../src/common/AppUpdateBanner'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const toggle = jest.fn(); diff --git a/test/common/ErrorHandler.test.tsx b/test/common/ErrorHandler.test.tsx index c924e137..67d271c4 100644 --- a/test/common/ErrorHandler.test.tsx +++ b/test/common/ErrorHandler.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { ErrorHandler as createErrorHandler } from '../../src/common/ErrorHandler'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; const ComponentWithError = () => { throw new Error('Error!!'); diff --git a/test/common/MainHeader.test.tsx b/test/common/MainHeader.test.tsx index c29d3c63..e3187c7e 100644 --- a/test/common/MainHeader.test.tsx +++ b/test/common/MainHeader.test.tsx @@ -2,7 +2,7 @@ import { screen, waitFor } from '@testing-library/react'; import { Router } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { MainHeader as createMainHeader } from '../../src/common/MainHeader'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const MainHeader = createMainHeader(() => <>ServersDropdown); diff --git a/test/domains/DomainSelector.test.tsx b/test/domains/DomainSelector.test.tsx index 7ae03403..e2effdf4 100644 --- a/test/domains/DomainSelector.test.tsx +++ b/test/domains/DomainSelector.test.tsx @@ -3,7 +3,7 @@ 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 { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const domainsList = Mock.of({ diff --git a/test/domains/ManageDomains.test.tsx b/test/domains/ManageDomains.test.tsx index 55415c29..509ee2c7 100644 --- a/test/domains/ManageDomains.test.tsx +++ b/test/domains/ManageDomains.test.tsx @@ -4,7 +4,7 @@ import { DomainsList } from '../../src/domains/reducers/domainsList'; import { ManageDomains } from '../../src/domains/ManageDomains'; import { ProblemDetailsError, ShlinkDomain } from '../../src/api/types'; import { SelectedServer } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const listDomains = jest.fn(); diff --git a/test/domains/helpers/DomainDropdown.test.tsx b/test/domains/helpers/DomainDropdown.test.tsx index 09f2f05c..90b5658b 100644 --- a/test/domains/helpers/DomainDropdown.test.tsx +++ b/test/domains/helpers/DomainDropdown.test.tsx @@ -5,7 +5,7 @@ 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 { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const editDomainRedirects = jest.fn().mockResolvedValue(undefined); diff --git a/test/domains/helpers/DomainStatusIcon.test.tsx b/test/domains/helpers/DomainStatusIcon.test.tsx index e7bc6946..a95ab027 100644 --- a/test/domains/helpers/DomainStatusIcon.test.tsx +++ b/test/domains/helpers/DomainStatusIcon.test.tsx @@ -2,7 +2,7 @@ import { screen } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { DomainStatus } from '../../../src/domains/data'; import { DomainStatusIcon } from '../../../src/domains/helpers/DomainStatusIcon'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const matchMedia = jest.fn().mockReturnValue(Mock.of({ matches: false })); diff --git a/test/domains/helpers/EditDomainRedirectsModal.test.tsx b/test/domains/helpers/EditDomainRedirectsModal.test.tsx index 1b8753f4..6f402350 100644 --- a/test/domains/helpers/EditDomainRedirectsModal.test.tsx +++ b/test/domains/helpers/EditDomainRedirectsModal.test.tsx @@ -2,7 +2,7 @@ import { fireEvent, screen, waitFor } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { ShlinkDomain } from '../../../src/api/types'; import { EditDomainRedirectsModal } from '../../../src/domains/helpers/EditDomainRedirectsModal'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const editDomainRedirects = jest.fn().mockResolvedValue(undefined); diff --git a/test/servers/CreateServer.test.tsx b/test/servers/CreateServer.test.tsx index a12aa73e..dd559dc3 100644 --- a/test/servers/CreateServer.test.tsx +++ b/test/servers/CreateServer.test.tsx @@ -3,7 +3,7 @@ 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 { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useNavigate: jest.fn() })); diff --git a/test/servers/DeleteServerButton.test.tsx b/test/servers/DeleteServerButton.test.tsx index 3d636182..c26431e5 100644 --- a/test/servers/DeleteServerButton.test.tsx +++ b/test/servers/DeleteServerButton.test.tsx @@ -3,7 +3,7 @@ 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 { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const DeleteServerButton = createDeleteServerButton( diff --git a/test/servers/DeleteServerModal.test.tsx b/test/servers/DeleteServerModal.test.tsx index 4defa691..cf509b41 100644 --- a/test/servers/DeleteServerModal.test.tsx +++ b/test/servers/DeleteServerModal.test.tsx @@ -3,7 +3,7 @@ import { Mock } from 'ts-mockery'; import { useNavigate } from 'react-router-dom'; import { DeleteServerModal } from '../../src/servers/DeleteServerModal'; import { ServerWithId } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useNavigate: jest.fn() })); diff --git a/test/servers/EditServer.test.tsx b/test/servers/EditServer.test.tsx index 0ecf87ca..771a6210 100644 --- a/test/servers/EditServer.test.tsx +++ b/test/servers/EditServer.test.tsx @@ -3,7 +3,7 @@ import { Mock } from 'ts-mockery'; import { useNavigate } from 'react-router-dom'; import { EditServer as editServerConstruct } from '../../src/servers/EditServer'; import { ReachableServer, SelectedServer } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useNavigate: jest.fn() })); diff --git a/test/servers/ManageServers.test.tsx b/test/servers/ManageServers.test.tsx index 8fc19b78..520e5b4f 100644 --- a/test/servers/ManageServers.test.tsx +++ b/test/servers/ManageServers.test.tsx @@ -4,7 +4,7 @@ import { MemoryRouter } from 'react-router-dom'; import ServersExporter from '../../src/servers/services/ServersExporter'; import { ManageServers as createManageServers } from '../../src/servers/ManageServers'; import { ServersMap, ServerWithId } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const exportServers = jest.fn(); diff --git a/test/servers/ManageServersRowDropdown.test.tsx b/test/servers/ManageServersRowDropdown.test.tsx index 85b544c3..043950f0 100644 --- a/test/servers/ManageServersRowDropdown.test.tsx +++ b/test/servers/ManageServersRowDropdown.test.tsx @@ -3,7 +3,7 @@ import { Mock } from 'ts-mockery'; import { MemoryRouter } from 'react-router-dom'; import { ServerWithId } from '../../src/servers/data'; import { ManageServersRowDropdown as createManageServersRowDropdown } from '../../src/servers/ManageServersRowDropdown'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const ManageServersRowDropdown = createManageServersRowDropdown( diff --git a/test/servers/ServersDropdown.test.tsx b/test/servers/ServersDropdown.test.tsx index 0f18fbf4..102cec91 100644 --- a/test/servers/ServersDropdown.test.tsx +++ b/test/servers/ServersDropdown.test.tsx @@ -4,7 +4,7 @@ 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 { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const fallbackServers: ServersMap = { diff --git a/test/servers/helpers/DuplicatedServersModal.test.tsx b/test/servers/helpers/DuplicatedServersModal.test.tsx index fe41a5b8..0441b4e5 100644 --- a/test/servers/helpers/DuplicatedServersModal.test.tsx +++ b/test/servers/helpers/DuplicatedServersModal.test.tsx @@ -2,7 +2,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 { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const onDiscard = jest.fn(); diff --git a/test/servers/helpers/ImportServersBtn.test.tsx b/test/servers/helpers/ImportServersBtn.test.tsx index b7c49303..605270fa 100644 --- a/test/servers/helpers/ImportServersBtn.test.tsx +++ b/test/servers/helpers/ImportServersBtn.test.tsx @@ -6,7 +6,7 @@ import { } from '../../../src/servers/helpers/ImportServersBtn'; import { ServersImporter } from '../../../src/servers/services/ServersImporter'; import { ServersMap, ServerWithId } from '../../../src/servers/data'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const onImportMock = jest.fn(); diff --git a/test/settings/RealTimeUpdatesSettings.test.tsx b/test/settings/RealTimeUpdatesSettings.test.tsx index aed93bde..943f8157 100644 --- a/test/settings/RealTimeUpdatesSettings.test.tsx +++ b/test/settings/RealTimeUpdatesSettings.test.tsx @@ -5,7 +5,7 @@ import { Settings, } from '../../src/settings/reducers/settings'; import { RealTimeUpdatesSettings } from '../../src/settings/RealTimeUpdatesSettings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const toggleRealTimeUpdates = jest.fn(); diff --git a/test/settings/ShortUrlCreationSettings.test.tsx b/test/settings/ShortUrlCreationSettings.test.tsx index 77038cbb..57ea949a 100644 --- a/test/settings/ShortUrlCreationSettings.test.tsx +++ b/test/settings/ShortUrlCreationSettings.test.tsx @@ -2,7 +2,7 @@ import { screen } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { ShortUrlCreationSettings as ShortUrlsSettings, Settings } from '../../src/settings/reducers/settings'; import { ShortUrlCreationSettings } from '../../src/settings/ShortUrlCreationSettings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setShortUrlCreationSettings = jest.fn(); diff --git a/test/settings/ShortUrlsListSettings.test.tsx b/test/settings/ShortUrlsListSettings.test.tsx index f396c723..53350a0e 100644 --- a/test/settings/ShortUrlsListSettings.test.tsx +++ b/test/settings/ShortUrlsListSettings.test.tsx @@ -3,7 +3,7 @@ import { Mock } from 'ts-mockery'; import { Settings, ShortUrlsListSettings as ShortUrlsSettings } from '../../src/settings/reducers/settings'; import { ShortUrlsListSettings } from '../../src/settings/ShortUrlsListSettings'; import { ShortUrlsOrder } from '../../src/short-urls/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setSettings = jest.fn(); diff --git a/test/settings/TagsSettings.test.tsx b/test/settings/TagsSettings.test.tsx index c110b033..854ebf9f 100644 --- a/test/settings/TagsSettings.test.tsx +++ b/test/settings/TagsSettings.test.tsx @@ -4,7 +4,7 @@ import { Settings, TagsMode, TagsSettings as TagsSettingsOptions } from '../../s import { TagsSettings } from '../../src/settings/TagsSettings'; import { TagsOrder } from '../../src/tags/data/TagsListChildrenProps'; import { capitalize } from '../../src/utils/utils'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setTagsSettings = jest.fn(); diff --git a/test/settings/UserInterfaceSettings.test.tsx b/test/settings/UserInterfaceSettings.test.tsx index ebfee1ee..12270b37 100644 --- a/test/settings/UserInterfaceSettings.test.tsx +++ b/test/settings/UserInterfaceSettings.test.tsx @@ -3,7 +3,7 @@ import { Mock } from 'ts-mockery'; import { Settings, UiSettings } from '../../src/settings/reducers/settings'; import { UserInterfaceSettings } from '../../src/settings/UserInterfaceSettings'; import { Theme } from '../../src/utils/theme'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setUiSettings = jest.fn(); diff --git a/test/settings/VisitsSettings.test.tsx b/test/settings/VisitsSettings.test.tsx index c2926d2b..8d198272 100644 --- a/test/settings/VisitsSettings.test.tsx +++ b/test/settings/VisitsSettings.test.tsx @@ -2,7 +2,7 @@ import { screen } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { Settings } from '../../src/settings/reducers/settings'; import { VisitsSettings } from '../../src/settings/VisitsSettings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setVisitsSettings = jest.fn(); diff --git a/test/short-urls/ShortUrlForm.test.tsx b/test/short-urls/ShortUrlForm.test.tsx index 4c741e93..60b983c4 100644 --- a/test/short-urls/ShortUrlForm.test.tsx +++ b/test/short-urls/ShortUrlForm.test.tsx @@ -6,7 +6,7 @@ import { ShortUrlForm as createShortUrlForm, Mode } from '../../src/short-urls/S import { ReachableServer, SelectedServer } from '../../src/servers/data'; import { parseDate } from '../../src/utils/helpers/date'; import { OptionalString } from '../../src/utils/utils'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const createShortUrl = jest.fn(async () => Promise.resolve()); diff --git a/test/short-urls/ShortUrlsFilteringBar.test.tsx b/test/short-urls/ShortUrlsFilteringBar.test.tsx index c5f7f247..10adb9fc 100644 --- a/test/short-urls/ShortUrlsFilteringBar.test.tsx +++ b/test/short-urls/ShortUrlsFilteringBar.test.tsx @@ -6,7 +6,7 @@ import { ShortUrlsFilteringBar as filteringBarCreator } from '../../src/short-ur import { ReachableServer, SelectedServer } from '../../src/servers/data'; import { DateRange } from '../../src/utils/dates/types'; import { formatDate } from '../../src/utils/helpers/date'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), diff --git a/test/short-urls/ShortUrlsList.test.tsx b/test/short-urls/ShortUrlsList.test.tsx index 8c9f0eea..06b062ed 100644 --- a/test/short-urls/ShortUrlsList.test.tsx +++ b/test/short-urls/ShortUrlsList.test.tsx @@ -9,7 +9,7 @@ import { ShortUrlsList as ShortUrlsListModel } from '../../src/short-urls/reduce import { ReachableServer } from '../../src/servers/data'; import { Settings } from '../../src/settings/reducers/settings'; import { ShortUrlsTableProps } from '../../src/short-urls/ShortUrlsTable'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), diff --git a/test/short-urls/ShortUrlsTable.test.tsx b/test/short-urls/ShortUrlsTable.test.tsx index f16e3218..c3fded0a 100644 --- a/test/short-urls/ShortUrlsTable.test.tsx +++ b/test/short-urls/ShortUrlsTable.test.tsx @@ -4,7 +4,7 @@ import { ShortUrlsTable as shortUrlsTableCreator } from '../../src/short-urls/Sh 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 { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const shortUrlsList = Mock.all(); diff --git a/test/short-urls/UseExistingIfFoundInfoIcon.test.tsx b/test/short-urls/UseExistingIfFoundInfoIcon.test.tsx index b823296b..43d2319a 100644 --- a/test/short-urls/UseExistingIfFoundInfoIcon.test.tsx +++ b/test/short-urls/UseExistingIfFoundInfoIcon.test.tsx @@ -1,6 +1,6 @@ import { screen } from '@testing-library/react'; import { UseExistingIfFoundInfoIcon } from '../../src/short-urls/UseExistingIfFoundInfoIcon'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { it('shows modal when icon is clicked', async () => { diff --git a/test/short-urls/helpers/CreateShortUrlResult.test.tsx b/test/short-urls/helpers/CreateShortUrlResult.test.tsx index e32e944b..03082a93 100644 --- a/test/short-urls/helpers/CreateShortUrlResult.test.tsx +++ b/test/short-urls/helpers/CreateShortUrlResult.test.tsx @@ -3,7 +3,7 @@ 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 { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const copyToClipboard = jest.fn(); diff --git a/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx b/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx index 18f0bdac..c3abad98 100644 --- a/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx +++ b/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx @@ -4,7 +4,7 @@ import { MemoryRouter } from 'react-router-dom'; import { 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 { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const listShortUrls = jest.fn(); diff --git a/test/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.test.tsx b/test/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.test.tsx index 94cb23c7..ae20d61f 100644 --- a/test/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.test.tsx +++ b/test/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { QrErrorCorrection } from '../../../../src/utils/helpers/qrCodes'; import { QrErrorCorrectionDropdown } from '../../../../src/short-urls/helpers/qr-codes/QrErrorCorrectionDropdown'; -import { renderWithEvents } from '../../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../../__helpers__/setUpTest'; describe('', () => { const initialErrorCorrection: QrErrorCorrection = 'Q'; diff --git a/test/short-urls/helpers/qr-codes/QrFormatDropdown.test.tsx b/test/short-urls/helpers/qr-codes/QrFormatDropdown.test.tsx index 04767a34..499a5e89 100644 --- a/test/short-urls/helpers/qr-codes/QrFormatDropdown.test.tsx +++ b/test/short-urls/helpers/qr-codes/QrFormatDropdown.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { QrCodeFormat } from '../../../../src/utils/helpers/qrCodes'; import { QrFormatDropdown } from '../../../../src/short-urls/helpers/qr-codes/QrFormatDropdown'; -import { renderWithEvents } from '../../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../../__helpers__/setUpTest'; describe('', () => { const initialFormat: QrCodeFormat = 'svg'; diff --git a/test/tags/TagCard.test.tsx b/test/tags/TagCard.test.tsx index 60e8a488..d0e9297c 100644 --- a/test/tags/TagCard.test.tsx +++ b/test/tags/TagCard.test.tsx @@ -4,7 +4,7 @@ import { Mock } from 'ts-mockery'; import { TagCard as createTagCard } from '../../src/tags/TagCard'; import { ColorGenerator } from '../../src/utils/services/ColorGenerator'; import { ReachableServer } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const TagCard = createTagCard( diff --git a/test/tags/TagsCards.test.tsx b/test/tags/TagsCards.test.tsx index 06274262..36d6f286 100644 --- a/test/tags/TagsCards.test.tsx +++ b/test/tags/TagsCards.test.tsx @@ -4,7 +4,7 @@ import { TagsCards as createTagsCards } from '../../src/tags/TagsCards'; import { SelectedServer } from '../../src/servers/data'; import { rangeOf } from '../../src/utils/utils'; import { NormalizedTag } from '../../src/tags/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const amountOfTags = 10; diff --git a/test/tags/TagsList.test.tsx b/test/tags/TagsList.test.tsx index b386fb5b..03caedcd 100644 --- a/test/tags/TagsList.test.tsx +++ b/test/tags/TagsList.test.tsx @@ -5,7 +5,7 @@ import { TagsList as createTagsList, TagsListProps } from '../../src/tags/TagsLi import { TagsList } from '../../src/tags/reducers/tagsList'; import { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub'; import { Settings } from '../../src/settings/reducers/settings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const filterTags = jest.fn(); diff --git a/test/tags/TagsModeDropdown.test.tsx b/test/tags/TagsModeDropdown.test.tsx index 7dfda64f..9550a04b 100644 --- a/test/tags/TagsModeDropdown.test.tsx +++ b/test/tags/TagsModeDropdown.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { TagsModeDropdown } from '../../src/tags/TagsModeDropdown'; import { TagsMode } from '../../src/settings/reducers/settings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const onChange = jest.fn(); diff --git a/test/tags/helpers/DeleteTagConfirmModal.test.tsx b/test/tags/helpers/DeleteTagConfirmModal.test.tsx index b141d6a5..8ca667ea 100644 --- a/test/tags/helpers/DeleteTagConfirmModal.test.tsx +++ b/test/tags/helpers/DeleteTagConfirmModal.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { DeleteTagConfirmModal } from '../../../src/tags/helpers/DeleteTagConfirmModal'; import { TagDeletion } from '../../../src/tags/reducers/tagDelete'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const tag = 'nodejs'; diff --git a/test/tags/helpers/Tag.test.tsx b/test/tags/helpers/Tag.test.tsx index a7f24c6f..e8ecbaf6 100644 --- a/test/tags/helpers/Tag.test.tsx +++ b/test/tags/helpers/Tag.test.tsx @@ -4,7 +4,7 @@ import { ReactNode } from 'react'; import { ColorGenerator } from '../../../src/utils/services/ColorGenerator'; import { MAIN_COLOR } from '../../../src/utils/theme'; import { Tag } from '../../../src/tags/helpers/Tag'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; const hexToRgb = (hex: string) => { const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); diff --git a/test/utils/Checkbox.test.tsx b/test/utils/Checkbox.test.tsx index a60f3a3e..d290b319 100644 --- a/test/utils/Checkbox.test.tsx +++ b/test/utils/Checkbox.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; import { Checkbox } from '../../src/utils/Checkbox'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { it.each([['foo'], ['bar'], ['baz']])('includes extra class names when provided', (className) => { diff --git a/test/utils/CopyToClipboardIcon.test.tsx b/test/utils/CopyToClipboardIcon.test.tsx index df7b3f99..3423a3d9 100644 --- a/test/utils/CopyToClipboardIcon.test.tsx +++ b/test/utils/CopyToClipboardIcon.test.tsx @@ -1,5 +1,5 @@ import { CopyToClipboardIcon } from '../../src/utils/CopyToClipboardIcon'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const onCopy = jest.fn(); diff --git a/test/utils/DateInput.test.tsx b/test/utils/DateInput.test.tsx index eba1eb05..e036433c 100644 --- a/test/utils/DateInput.test.tsx +++ b/test/utils/DateInput.test.tsx @@ -1,7 +1,7 @@ import { screen, waitFor } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { DateInput, DateInputProps } from '../../src/utils/DateInput'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setUp = (props: Partial = {}) => renderWithEvents( diff --git a/test/utils/InfoTooltip.test.tsx b/test/utils/InfoTooltip.test.tsx index 8a651b9c..1bda4e60 100644 --- a/test/utils/InfoTooltip.test.tsx +++ b/test/utils/InfoTooltip.test.tsx @@ -1,7 +1,7 @@ import { screen, waitFor } from '@testing-library/react'; import { Placement } from '@popperjs/core'; import { InfoTooltip, InfoTooltipProps } from '../../src/utils/InfoTooltip'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const setUp = (props: Partial = {}) => renderWithEvents( diff --git a/test/utils/OrderingDropdown.test.tsx b/test/utils/OrderingDropdown.test.tsx index 47c83302..f8e78944 100644 --- a/test/utils/OrderingDropdown.test.tsx +++ b/test/utils/OrderingDropdown.test.tsx @@ -2,7 +2,7 @@ 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 { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const items = { diff --git a/test/utils/dates/DateIntervalDropdownItems.test.tsx b/test/utils/dates/DateIntervalDropdownItems.test.tsx index 0cbf817e..0e9ec52f 100644 --- a/test/utils/dates/DateIntervalDropdownItems.test.tsx +++ b/test/utils/dates/DateIntervalDropdownItems.test.tsx @@ -2,7 +2,7 @@ import { screen, waitFor } from '@testing-library/react'; import { DateIntervalDropdownItems } from '../../../src/utils/dates/DateIntervalDropdownItems'; import { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from '../../../src/utils/dates/types'; import { DropdownBtn } from '../../../src/utils/DropdownBtn'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const onChange = jest.fn(); diff --git a/test/utils/dates/DateIntervalSelector.test.tsx b/test/utils/dates/DateIntervalSelector.test.tsx index abca608e..ebff24a1 100644 --- a/test/utils/dates/DateIntervalSelector.test.tsx +++ b/test/utils/dates/DateIntervalSelector.test.tsx @@ -1,7 +1,7 @@ import { screen, waitFor } from '@testing-library/react'; import { DateInterval, rangeOrIntervalToString } from '../../../src/utils/dates/types'; import { DateIntervalSelector } from '../../../src/utils/dates/DateIntervalSelector'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const activeInterval: DateInterval = 'last7Days'; diff --git a/test/visits/DomainVisits.test.tsx b/test/visits/DomainVisits.test.tsx index 7697a1eb..19be1892 100644 --- a/test/visits/DomainVisits.test.tsx +++ b/test/visits/DomainVisits.test.tsx @@ -9,7 +9,7 @@ import { DomainVisits } from '../../src/visits/reducers/domainVisits'; import { Settings } from '../../src/settings/reducers/settings'; import { SelectedServer } from '../../src/servers/data'; import { Visit } from '../../src/visits/types'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), diff --git a/test/visits/NonOrphanVisits.test.tsx b/test/visits/NonOrphanVisits.test.tsx index f27ec3f5..1c3572de 100644 --- a/test/visits/NonOrphanVisits.test.tsx +++ b/test/visits/NonOrphanVisits.test.tsx @@ -8,7 +8,7 @@ import { Visit, VisitsInfo } from '../../src/visits/types'; import { Settings } from '../../src/settings/reducers/settings'; import { ReportExporter } from '../../src/common/services/ReportExporter'; import { SelectedServer } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const exportVisits = jest.fn(); diff --git a/test/visits/OrphanVisits.test.tsx b/test/visits/OrphanVisits.test.tsx index 874be1ef..6f92edf4 100644 --- a/test/visits/OrphanVisits.test.tsx +++ b/test/visits/OrphanVisits.test.tsx @@ -8,7 +8,7 @@ import { Visit, VisitsInfo } from '../../src/visits/types'; import { Settings } from '../../src/settings/reducers/settings'; import { ReportExporter } from '../../src/common/services/ReportExporter'; import { SelectedServer } from '../../src/servers/data'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const getOrphanVisits = jest.fn(); diff --git a/test/visits/ShortUrlVisits.test.tsx b/test/visits/ShortUrlVisits.test.tsx index a2dc15b4..4e6f4376 100644 --- a/test/visits/ShortUrlVisits.test.tsx +++ b/test/visits/ShortUrlVisits.test.tsx @@ -10,7 +10,7 @@ import { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub'; import { ReportExporter } from '../../src/common/services/ReportExporter'; import { Visit } from '../../src/visits/types'; import { Settings } from '../../src/settings/reducers/settings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const getShortUrlVisitsMock = jest.fn(); diff --git a/test/visits/ShortUrlVisitsHeader.test.tsx b/test/visits/ShortUrlVisitsHeader.test.tsx index 78ff2ba0..12c8fa80 100644 --- a/test/visits/ShortUrlVisitsHeader.test.tsx +++ b/test/visits/ShortUrlVisitsHeader.test.tsx @@ -4,7 +4,7 @@ import { formatDistance, parseISO } from 'date-fns'; import { ShortUrlVisitsHeader } from '../../src/visits/ShortUrlVisitsHeader'; import { ShortUrlDetail } from '../../src/short-urls/reducers/shortUrlDetail'; import { ShortUrlVisits } from '../../src/visits/reducers/shortUrlVisits'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; describe('', () => { const dateCreated = '2018-01-01T10:00:00+00:00'; diff --git a/test/visits/TagVisits.test.tsx b/test/visits/TagVisits.test.tsx index 7225a809..feb4bcae 100644 --- a/test/visits/TagVisits.test.tsx +++ b/test/visits/TagVisits.test.tsx @@ -9,7 +9,7 @@ import { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub'; import { ReportExporter } from '../../src/common/services/ReportExporter'; import { Visit } from '../../src/visits/types'; import { Settings } from '../../src/settings/reducers/settings'; -import { renderWithEvents } from '../__mocks__/setUpTest'; +import { renderWithEvents } from '../__helpers__/setUpTest'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), diff --git a/test/visits/charts/DoughnutChart.test.tsx b/test/visits/charts/DoughnutChart.test.tsx index e942bd7f..2dee8163 100644 --- a/test/visits/charts/DoughnutChart.test.tsx +++ b/test/visits/charts/DoughnutChart.test.tsx @@ -1,6 +1,6 @@ import { screen } from '@testing-library/react'; import { DoughnutChart } from '../../../src/visits/charts/DoughnutChart'; -import { setUpCanvas } from '../../__mocks__/setUpTest'; +import { setUpCanvas } from '../../__helpers__/setUpTest'; describe('', () => { const stats = { diff --git a/test/visits/charts/HorizontalBarChart.test.tsx b/test/visits/charts/HorizontalBarChart.test.tsx index cc5c1b6b..6664f1bf 100644 --- a/test/visits/charts/HorizontalBarChart.test.tsx +++ b/test/visits/charts/HorizontalBarChart.test.tsx @@ -1,5 +1,5 @@ import { HorizontalBarChart, HorizontalBarChartProps } from '../../../src/visits/charts/HorizontalBarChart'; -import { setUpCanvas } from '../../__mocks__/setUpTest'; +import { setUpCanvas } from '../../__helpers__/setUpTest'; describe('', () => { const setUp = (props: HorizontalBarChartProps) => setUpCanvas(); diff --git a/test/visits/charts/LineChartCard.test.tsx b/test/visits/charts/LineChartCard.test.tsx index db5e9040..433615b3 100644 --- a/test/visits/charts/LineChartCard.test.tsx +++ b/test/visits/charts/LineChartCard.test.tsx @@ -4,7 +4,7 @@ import { formatISO, subDays, subMonths, subYears } from 'date-fns'; import { Mock } from 'ts-mockery'; import { LineChartCard } from '../../../src/visits/charts/LineChartCard'; import { NormalizedVisit } from '../../../src/visits/types'; -import { setUpCanvas } from '../../__mocks__/setUpTest'; +import { setUpCanvas } from '../../__helpers__/setUpTest'; describe('', () => { const setUp = (visits: NormalizedVisit[] = [], highlightedVisits: NormalizedVisit[] = []) => ({ diff --git a/test/visits/helpers/OpenMapModalBtn.test.tsx b/test/visits/helpers/OpenMapModalBtn.test.tsx index 5c851ae9..2e83dc71 100644 --- a/test/visits/helpers/OpenMapModalBtn.test.tsx +++ b/test/visits/helpers/OpenMapModalBtn.test.tsx @@ -2,7 +2,7 @@ import { screen, waitFor } from '@testing-library/react'; import { Mock } from 'ts-mockery'; import { OpenMapModalBtn } from '../../../src/visits/helpers/OpenMapModalBtn'; import { CityStats } from '../../../src/visits/types'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const title = 'Foo'; diff --git a/test/visits/helpers/VisitsFilterDropdown.test.tsx b/test/visits/helpers/VisitsFilterDropdown.test.tsx index 71ce49c8..eb3f38a2 100644 --- a/test/visits/helpers/VisitsFilterDropdown.test.tsx +++ b/test/visits/helpers/VisitsFilterDropdown.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { OrphanVisitType, VisitsFilter } from '../../../src/visits/types'; import { VisitsFilterDropdown } from '../../../src/visits/helpers/VisitsFilterDropdown'; -import { renderWithEvents } from '../../__mocks__/setUpTest'; +import { renderWithEvents } from '../../__helpers__/setUpTest'; describe('', () => { const onChange = jest.fn();