Skip to content

Commit

Permalink
Refactored src/screens/FundCampaignPledge/PledgeDeleteModal.test.tsx …
Browse files Browse the repository at this point in the history
…from jest to vitest (#3219)

* refactored src/screens/FundCampaignPledge/PledgeDeleteModal.test.tsx from jest to vitest

* fixed linting issues
  • Loading branch information
syedali237 authored Jan 9, 2025
1 parent edc013d commit e9aec17
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import i18nForTest from '../../utils/i18nForTest';
import { MOCKS_DELETE_PLEDGE_ERROR, MOCKS } from './PledgesMocks';
import { StaticMockLink } from 'utils/StaticMockLink';
import { toast } from 'react-toastify';
import { vi } from 'vitest';

jest.mock('react-toastify', () => ({
vi.mock('react-toastify', () => ({
toast: {
success: jest.fn(),
error: jest.fn(),
success: vi.fn(),
error: vi.fn(),
},
}));

Expand All @@ -31,7 +32,7 @@ const translations = JSON.parse(

const pledgeProps: InterfaceDeletePledgeModal = {
isOpen: true,
hide: jest.fn(),
hide: vi.fn(),
pledge: {
_id: '1',
amount: 100,
Expand All @@ -47,7 +48,7 @@ const pledgeProps: InterfaceDeletePledgeModal = {
},
],
},
refetchPledge: jest.fn(),
refetchPledge: vi.fn(),
};

const renderPledgeDeleteModal = (
Expand Down

0 comments on commit e9aec17

Please sign in to comment.