Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
DuCanhGH committed Jul 6, 2023
1 parent 5b77c9b commit 8cd86a3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/production/standalone-mode/no-app-routes/app/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function Root({ children }) {
return (
<html>
<head></head>
<body>{children}</body>
</html>
)
}
14 changes: 14 additions & 0 deletions test/production/standalone-mode/no-app-routes/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createNextDescribe } from 'e2e-utils'

createNextDescribe(
'standalone mode - no app routes',
{
files: __dirname,
},
({ next }) => {
it('should handle pages rendering correctly', async () => {
const browser = await next.browser('/hello')
expect(await browser.elementByCss('#index').text()).toBe('index-page')
})
}
)
3 changes: 3 additions & 0 deletions test/production/standalone-mode/no-app-routes/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
output: 'standalone',
}
3 changes: 3 additions & 0 deletions test/production/standalone-mode/no-app-routes/pages/hello.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <p id="index">index-page</p>
}

0 comments on commit 8cd86a3

Please sign in to comment.