From 60002f1152b98d374982e884346339c5c5faf8b9 Mon Sep 17 00:00:00 2001 From: im-vedant <194vedantgutpa@gmail.com> Date: Sun, 15 Dec 2024 04:15:35 +0530 Subject: [PATCH] replaced vi.mock with vi.doMock --- src/screens/OrganizationVenues/OrganizationVenues.spec.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/screens/OrganizationVenues/OrganizationVenues.spec.tsx b/src/screens/OrganizationVenues/OrganizationVenues.spec.tsx index a9a1301eb5..1528a0928e 100644 --- a/src/screens/OrganizationVenues/OrganizationVenues.spec.tsx +++ b/src/screens/OrganizationVenues/OrganizationVenues.spec.tsx @@ -271,7 +271,7 @@ const renderOrganizationVenue = (link: ApolloLink): RenderResult => { describe('OrganizationVenue with missing orgId', () => { beforeAll(() => { - vi.mock('react-router-dom', async () => ({ + vi.doMock('react-router-dom', async () => ({ ...(await vi.importActual('react-router-dom')), useParams: () => ({ orgId: undefined }), })); @@ -298,7 +298,6 @@ describe('OrganizationVenue with missing orgId', () => { , ); - await waitFor(() => { const paramsError = screen.getByTestId('paramsError'); expect(paramsError).toBeInTheDocument(); @@ -310,7 +309,7 @@ describe('Organisation Venues', () => { global.alert = vi.fn(); beforeAll(() => { - vi.mock('react-router-dom', async () => ({ + vi.doMock('react-router-dom', async () => ({ ...(await vi.importActual('react-router-dom')), useParams: () => ({ orgId: 'orgId' }), }));