Skip to content

Commit

Permalink
add root not found case
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Mar 30, 2023
1 parent 269baa1 commit 329ee00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions test/e2e/app-dir/metadata/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function notFound() {
return <h2>root not found page</h2>
}
5 changes: 2 additions & 3 deletions test/e2e/app-dir/metadata/metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,11 @@ createNextDescribe(
const res = await next.fetch('/async/not-found')
expect(res.status).toBe(404)
const html = await res.text()
expect(html).not.toBe('not-found-text')
expect(html).toContain('This page could not be found.')
expect(html).toContain('root not found page')

const browser = await next.browser('/async/not-found')
expect(await browser.elementByCss('h2').text()).toBe(
'This page could not be found.'
'root not found page'
)
})

Expand Down

0 comments on commit 329ee00

Please sign in to comment.