Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Nov 2, 2022
1 parent f875a06 commit 39e5d82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/e2e/app-dir/app/app/dashboard/page/page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function DashboardPagePage() {
return (
<>
<p>hello dashboard/page!</p>
</>
)
}
5 changes: 5 additions & 0 deletions test/e2e/app-dir/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ describe('app dir', () => {
)
})

it('should serve page as a segment name correctly', async () => {
const html = await renderViaHTTP(next.url, '/dashboard/page')
expect(html).toContain('hello dashboard/page!')
})

it('should include document html and body', async () => {
const html = await renderViaHTTP(next.url, '/dashboard')
const $ = cheerio.load(html)
Expand Down

0 comments on commit 39e5d82

Please sign in to comment.