Skip to content

Commit

Permalink
add expect corresponding matcher call to moduleInfo test
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Aug 27, 2021
1 parent d39dab0 commit 7fc52de
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ describe('ModuleInfo', () => {

it('should show module not connected', () => {
const { getByText } = render(props)
expect(getByText('Not Connected'))
expect(getByText('Not Connected')).toBeTruthy()
})

it('should show module connected and hub number', () => {
props = { ...props, usbPort: '1', hubPort: '1', isAttached: true }
const { getByText } = render(props)
expect(getByText('Connected'))
expect(getByText('USB Port 1 via hub'))
expect(getByText('Connected')).toBeTruthy()
expect(getByText('USB Port 1 via hub')).toBeTruthy()
})

it('should show module connected and no USB number', () => {
props = { ...props, usbPort: null, hubPort: null, isAttached: true }
const { getByText } = render(props)
expect(getByText('Connected'))
expect(getByText('USB Port Connected'))
expect(getByText('Connected')).toBeTruthy()
expect(getByText('USB Port Connected')).toBeTruthy()
})

it('should show module connected and USB number', () => {
props = { ...props, usbPort: '1', hubPort: null, isAttached: true }
const { getByText } = render(props)
expect(getByText('Connected'))
expect(getByText('USB Port 1'))
expect(getByText('Connected')).toBeTruthy()
expect(getByText('USB Port 1')).toBeTruthy()
})
})

0 comments on commit 7fc52de

Please sign in to comment.