Skip to content

Commit

Permalink
replaced vi.mock with vi.doMock
Browse files Browse the repository at this point in the history
  • Loading branch information
im-vedant committed Dec 14, 2024
1 parent 4acf452 commit 60002f1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/screens/OrganizationVenues/OrganizationVenues.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
}));
Expand All @@ -298,7 +298,6 @@ describe('OrganizationVenue with missing orgId', () => {
</MemoryRouter>
</MockedProvider>,
);

await waitFor(() => {
const paramsError = screen.getByTestId('paramsError');
expect(paramsError).toBeInTheDocument();
Expand All @@ -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' }),
}));
Expand Down

0 comments on commit 60002f1

Please sign in to comment.