Unverified Commit dcdacfd0 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

test: skip hybrid not-found coverage for the legacy builder (#96534)

## Summary

The `pages-router-app-not-found` test verifies behavior implemented by
the Next.js adapter. The legacy `@vercel/next` builder has a
pre-existing behavior where it prefers the Pages Router error page for
this hybrid routing case.

Skip this test when deployment tests run without the adapter. It will
continue running in development, `next start`, and adapter deployment
tests.

## Verification

- `NEXT_TEST_MODE=deploy NEXT_ENABLE_ADAPTER=0 pnpm testheadless
test/e2e/app-dir/pages-router-app-not-found/pages-router-app-not-found.test.ts`
- `pnpm testheadless
test/e2e/app-dir/pages-router-app-not-found/pages-router-app-not-found.test.ts`
parent 2aef3b81
import { nextTestSetup } from 'e2e-utils'
const isAdapterTest = process.env.NEXT_ENABLE_ADAPTER === '1'
describe('pages-router-app-not-found', () => {
const { next } = nextTestSetup({
files: __dirname,
// The legacy builder incorrectly replaces this response with the Pages
// Router error page. The adapter preserves the App Router not-found page.
skipDeployment: !isAdapterTest,
})
it('fully renders an app not-found selected by a pages route', async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment