Skip to content

Commit be18f3b

Browse files
author
Kent C. Dodds
committed
improve the thing
1 parent 69b8d76 commit be18f3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/__tests__/react-router-03.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ function render(
3131

3232
test('main renders about and home and I can navigate to those pages', () => {
3333
const {getByRole, getByText} = render(<Main />)
34-
expect(getByRole('heading')).toHaveTextContent(/Home/)
34+
expect(getByRole('heading')).toHaveTextContent(/home/i)
3535
fireEvent.click(getByText(/about/i))
36-
expect(getByRole('heading')).toHaveTextContent(/About/)
36+
expect(getByRole('heading')).toHaveTextContent(/about/i)
3737
// you can use the `within` function to get queries for elements within the
3838
// about screen
3939
})
@@ -42,5 +42,5 @@ test('landing on a bad page shows no match component', () => {
4242
const {getByRole} = render(<Main />, {
4343
route: '/something-that-does-not-match',
4444
})
45-
expect(getByRole('heading')).toHaveTextContent(/404/)
45+
expect(getByRole('heading')).toHaveTextContent(/404/i)
4646
})

0 commit comments

Comments
 (0)