Skip to content

Commit

Permalink
chore: removed unnecessary mock for react-i18
Browse files Browse the repository at this point in the history
  • Loading branch information
PiusKariuki committed Dec 19, 2024
1 parent 6762df0 commit db768d8
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { deleteProgramEnrollment, useEnrollments } from './programs.resource';
import DeleteProgramModal from './delete-program.modal';
import { showSnackbar, getCoreTranslation } from '@openmrs/esm-framework';
import { showSnackbar } from '@openmrs/esm-framework';

jest.mock('./programs.resource', () => ({
deleteProgramEnrollment: jest.fn(),
Expand All @@ -12,9 +12,6 @@ jest.mock('@openmrs/esm-framework', () => ({
showSnackbar: jest.fn(),
getCoreTranslation: jest.fn((key, defaultText) => defaultText),
}));
jest.mock('react-i18next', () => ({
useTranslation: () => ({ t: (key, defaultText) => defaultText }),
}));

const mockMutateEnrollments = jest.fn();
(useEnrollments as jest.Mock).mockImplementation(() => ({ mutateEnrollments: mockMutateEnrollments }));
Expand Down

0 comments on commit db768d8

Please sign in to comment.