Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
#33 fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gkillick committed Mar 31, 2022
1 parent e8326f8 commit 0219f43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/patientInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import PatientInfo from '../components/dashboard/MedicalView/PatientInfo/Patient
jest.mock('firebase/compat/app', () => {
// mock Firestore
const Firestore = () => ({
doc: () => ({
get: () => ({
then: () => null,
}),
}),
collection: () => ({

where: () => ({
Expand Down Expand Up @@ -54,6 +59,7 @@ jest.mock('firebase/firestore');
afterEach(cleanup);

test('Patient Info Renders correctly', async () => {
window.HTMLElement.prototype.scrollIntoView = () => null;
const component = render(<BrowserRouter><PatientInfo PID="123" /></BrowserRouter>);

const closeButton = component.getByText("Close Patient's File");
Expand Down

0 comments on commit 0219f43

Please sign in to comment.