mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> Allows you to `next build --experimental-app-only` which excludes `pages` altogether. Useful for quickly debugging while migrating. Co-authored-by: JJ Kasper <[email protected]>
21 lines
486 B
TypeScript
21 lines
486 B
TypeScript
import { createNextDescribe } from 'e2e-utils'
|
|
|
|
createNextDescribe(
|
|
'app-only-flag',
|
|
{
|
|
files: __dirname,
|
|
buildCommand: 'pnpm next build --experimental-app-only',
|
|
},
|
|
({ next }) => {
|
|
it('should serve app route', async () => {
|
|
const $ = await next.render$('/')
|
|
expect($('p').text()).toBe('hello world')
|
|
})
|
|
|
|
it('should not serve about route', async () => {
|
|
const res = await next.fetch('/about')
|
|
expect(res.status).toBe(404)
|
|
})
|
|
}
|
|
)
|