Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
style(lint): fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmeyer committed Apr 3, 2020
1 parent 23bbb1b commit 9690409
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 62 deletions.
25 changes: 5 additions & 20 deletions src/__tests__/components/Navbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ describe('Navbar', () => {
})
it('should navigate to / when the header is clicked', () => {
act(() => {
header
.first()
.props()
.onClick()
header.first().props().onClick()
})
expect(history.location.pathname).toEqual('/')
})
Expand All @@ -48,19 +45,13 @@ describe('Navbar', () => {
})
it('should navigate to /patients when the list option is selected', () => {
act(() => {
patientsLinkList
.first()
.props()
.children[0].props.onClick()
patientsLinkList.first().props().children[0].props.onClick()
})
expect(history.location.pathname).toEqual('/patients')
})
it('should navigate to /patients/new when the list option is selected', () => {
act(() => {
patientsLinkList
.first()
.props()
.children[1].props.onClick()
patientsLinkList.first().props().children[1].props.onClick()
})
expect(history.location.pathname).toEqual('/patients/new')
})
Expand All @@ -81,20 +72,14 @@ describe('Navbar', () => {

it('should navigate to to /appointments when the appointment list option is selected', () => {
act(() => {
scheduleLinkList
.first()
.props()
.children[0].props.onClick()
scheduleLinkList.first().props().children[0].props.onClick()
})
expect(history.location.pathname).toEqual('/appointments')
})

it('should navigate to /appointments/new when the new appointment list option is selected', () => {
act(() => {
scheduleLinkList
.first()
.props()
.children[1].props.onClick()
scheduleLinkList.first().props().children[1].props.onClick()
})
expect(history.location.pathname).toEqual('/appointments/new')
})
Expand Down
49 changes: 7 additions & 42 deletions src/__tests__/components/Sidebar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(1)
.text()
.trim(),
).toEqual('dashboard.label')
expect(listItems.at(1).text().trim()).toEqual('dashboard.label')
})

it('should be active when the current path is /', () => {
Expand Down Expand Up @@ -71,12 +66,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(2)
.text()
.trim(),
).toEqual('patients.label')
expect(listItems.at(2).text().trim()).toEqual('patients.label')
})

it('should be active when the current path is /', () => {
Expand Down Expand Up @@ -107,12 +97,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(4)
.text()
.trim(),
).toEqual('patients.patientsList')
expect(listItems.at(4).text().trim()).toEqual('patients.patientsList')
})

it('should be active when the current path is /patients', () => {
Expand Down Expand Up @@ -143,12 +128,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(3)
.text()
.trim(),
).toEqual('patients.newPatient')
expect(listItems.at(3).text().trim()).toEqual('patients.newPatient')
})

it('should be active when the current path is /patients/new', () => {
Expand Down Expand Up @@ -178,12 +158,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(3)
.text()
.trim(),
).toEqual('scheduling.label')
expect(listItems.at(3).text().trim()).toEqual('scheduling.label')
})

it('should be active when the current path is /appointments', () => {
Expand Down Expand Up @@ -214,12 +189,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(5)
.text()
.trim(),
).toEqual('scheduling.appointments.schedule')
expect(listItems.at(5).text().trim()).toEqual('scheduling.appointments.schedule')
})

it('should be active when the current path is /appointments', () => {
Expand Down Expand Up @@ -250,12 +220,7 @@ describe('Sidebar', () => {

const listItems = wrapper.find(ListItem)

expect(
listItems
.at(4)
.text()
.trim(),
).toEqual('scheduling.appointments.new')
expect(listItems.at(4).text().trim()).toEqual('scheduling.appointments.new')
})

it('should be active when the current path is /appointments/new', () => {
Expand Down

1 comment on commit 9690409

@vercel
Copy link

@vercel vercel bot commented on 9690409 Apr 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to assign a domain to your deployment due to the following error:

We could not create a certificate for staging.hospitalrun.io because HTTP pretest failed. Please ensure the CNAME for staging.hospitalrun.io points to "alias.zeit.co". You can find more information at https://err.sh/now-cli/cant-solve-challenge.

(Learn more or visit the non-aliased deployment)

Please sign in to comment.