Skip to content

Commit

Permalink
refactored: src/screens/OrgSettings from Jest to Vitest(fixes: #2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
devender18 committed Dec 10, 2024
1 parent bbce0c1 commit 72f1420
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/screens/OrgSettings/OrgSettings.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,11 @@ const link1 = new StaticMockLink(MOCKS);

const mockRouterParams = (orgId: string | undefined): void => {
vi.doMock('react-router-dom', async () => {
try {
const actual = await vi.importActual('react-router-dom');
return {
...actual,
useParams: () => ({ orgId }),
};
} catch (error) {
console.error('Failed to mock router params:', error);
throw error;
}
const actual = await vi.importActual('react-router-dom');
return {
...actual,
useParams: () => ({ orgId }),
};
});
};
const renderOrganisationSettings = (
Expand Down

0 comments on commit 72f1420

Please sign in to comment.