From d02edfa8d2e470801c4d043f6c3f65a2553b2e53 Mon Sep 17 00:00:00 2001 From: Syed Ali Ul Hasan Date: Sun, 26 Jan 2025 15:24:05 +0530 Subject: [PATCH] refactored src/screens/OrgPost/OrgPost.spec.tsx from jest to vitest (#3433) --- src/screens/OrgPost/{OrgPost.test.tsx => OrgPost.spec.tsx} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/screens/OrgPost/{OrgPost.test.tsx => OrgPost.spec.tsx} (99%) diff --git a/src/screens/OrgPost/OrgPost.test.tsx b/src/screens/OrgPost/OrgPost.spec.tsx similarity index 99% rename from src/screens/OrgPost/OrgPost.test.tsx rename to src/screens/OrgPost/OrgPost.spec.tsx index e9952db7bd..cfe2d8c9bf 100644 --- a/src/screens/OrgPost/OrgPost.test.tsx +++ b/src/screens/OrgPost/OrgPost.spec.tsx @@ -1,7 +1,6 @@ import { MockedProvider } from '@apollo/react-testing'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import 'jest-location-mock'; import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; import { BrowserRouter } from 'react-router-dom'; @@ -13,6 +12,7 @@ import { store } from 'state/store'; import { StaticMockLink } from 'utils/StaticMockLink'; import i18nForTest from 'utils/i18nForTest'; import OrgPost from './OrgPost'; +import { vi } from 'vitest'; const MOCKS = [ { request: { @@ -359,7 +359,7 @@ describe('Organisation Post Page', () => { expect(searchInput).toBeInTheDocument(); }); test('After creating a post, the data should be refetched', async () => { - const refetchMock = jest.fn(); + const refetchMock = vi.fn(); render(