diff --git a/src/__tests__/incidents/hooks/useReportIncident.test.tsx b/src/__tests__/incidents/hooks/useReportIncident.test.tsx index 031c694ebc..b716e863a3 100644 --- a/src/__tests__/incidents/hooks/useReportIncident.test.tsx +++ b/src/__tests__/incidents/hooks/useReportIncident.test.tsx @@ -11,6 +11,7 @@ import executeMutation from '../../test-utils/use-mutation.util' describe('useReportIncident', () => { beforeEach(() => { jest.restoreAllMocks() + console.error = jest.fn() }) it('should save the incident with correct data', async () => { diff --git a/src/__tests__/incidents/report/ReportIncident.test.tsx b/src/__tests__/incidents/report/ReportIncident.test.tsx index b8dd39df26..383cdb85dd 100644 --- a/src/__tests__/incidents/report/ReportIncident.test.tsx +++ b/src/__tests__/incidents/report/ReportIncident.test.tsx @@ -25,6 +25,7 @@ describe('Report Incident', () => { beforeEach(() => { jest.resetAllMocks() + console.error = jest.fn() }) let setButtonToolBarSpy: any diff --git a/src/__tests__/patients/allergies/NewAllergyModal.test.tsx b/src/__tests__/patients/allergies/NewAllergyModal.test.tsx index 6221bc399e..9d471f2dd7 100644 --- a/src/__tests__/patients/allergies/NewAllergyModal.test.tsx +++ b/src/__tests__/patients/allergies/NewAllergyModal.test.tsx @@ -24,6 +24,10 @@ describe('New Allergy Modal', () => { return { wrapper } } + beforeEach(() => { + console.error = jest.fn() + }) + it('should render a modal with the correct labels', () => { const { wrapper } = setup() diff --git a/src/__tests__/patients/hooks/useAddAllergy.test.tsx b/src/__tests__/patients/hooks/useAddAllergy.test.tsx index 4dd6041193..4a035a3320 100644 --- a/src/__tests__/patients/hooks/useAddAllergy.test.tsx +++ b/src/__tests__/patients/hooks/useAddAllergy.test.tsx @@ -9,6 +9,7 @@ import executeMutation from '../../test-utils/use-mutation.util' describe('use add allergy', () => { beforeEach(() => { jest.resetAllMocks() + console.error = jest.fn() }) it('should throw an error if allergy validation fails', async () => { diff --git a/src/patients/patients-slice.ts b/src/patients/patients-slice.ts index 15c910b9f4..819b495fe3 100644 --- a/src/patients/patients-slice.ts +++ b/src/patients/patients-slice.ts @@ -46,13 +46,9 @@ export const fetchPatients = (sortRequest: SortRequest = Unsorted): AppThunk => dispatch(fetchPatientsSuccess(patients)) } -export const searchPatients = ( - searchString: string, - sortRequest: SortRequest = Unsorted, -): AppThunk => async (dispatch) => { +export const searchPatients = (searchString: string): AppThunk => async (dispatch) => { dispatch(fetchPatientsStart()) - console.log(sortRequest) let patients if (searchString.trim() === '') { patients = await PatientRepository.findAll()