Skip to content

Commit

Permalink
refactor: jest to vitest of itemViewModal : fixes #2557 (#2716)
Browse files Browse the repository at this point in the history
* refactor: jest to vitest of itemViewModal : fixes #2557

* Update ItemViewModal.spec.tsx
  • Loading branch information
bandhan-majumder authored Dec 22, 2024
1 parent ed0a01c commit e2a86ae
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import type {
InterfaceUserInfo,
InterfaceVolunteerGroupInfo,
} from 'utils/interfaces';
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 Down Expand Up @@ -86,7 +87,7 @@ const actionItemCategory = {
const itemProps: InterfaceViewModalProps[] = [
{
isOpen: true,
hide: jest.fn(),
hide: vi.fn(),
item: {
_id: 'actionItemId1',
assignee: createAssignee(assigneeWithoutImage),
Expand All @@ -108,7 +109,7 @@ const itemProps: InterfaceViewModalProps[] = [
},
{
isOpen: true,
hide: jest.fn(),
hide: vi.fn(),
item: {
_id: 'actionItemId2',
assignee: createAssignee(assigneeWithImage),
Expand All @@ -130,7 +131,7 @@ const itemProps: InterfaceViewModalProps[] = [
},
{
isOpen: true,
hide: jest.fn(),
hide: vi.fn(),
item: {
_id: 'actionItemId2',
assignee: null,
Expand All @@ -152,7 +153,7 @@ const itemProps: InterfaceViewModalProps[] = [
},
{
isOpen: true,
hide: jest.fn(),
hide: vi.fn(),
item: {
_id: 'actionItemId2',
assignee: null,
Expand All @@ -174,7 +175,7 @@ const itemProps: InterfaceViewModalProps[] = [
},
{
isOpen: true,
hide: jest.fn(),
hide: vi.fn(),
item: {
_id: 'actionItemId2',
assignee: null,
Expand Down

0 comments on commit e2a86ae

Please sign in to comment.