Skip to content

Commit

Permalink
add test status code
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jun 30, 2021
1 parent 8f08bcb commit 35d1ed6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/integration/client-navigation/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('Client Navigation', () => {
afterAll(() => killApp(context.server))

it('should not reload when visiting /_error directly', async () => {
const { status } = await fetchViaHTTP(context.appPort, '/_error')
const browser = await webdriver(context.appPort, '/_error')

await browser.eval('window.hello = true')
Expand All @@ -41,6 +42,7 @@ describe('Client Navigation', () => {
}
const html = await browser.eval('document.documentElement.innerHTML')

expect(status).toBe(404)
expect(html).toContain('This page could not be found')
expect(html).toContain('404')
})
Expand Down

0 comments on commit 35d1ed6

Please sign in to comment.