mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
These tests won't ever be run in a deployed environment, so this removes `skipDeployment` so it's easier to grok which tests are intentionally disabled because they don't work when deployed.
29 lines
909 B
TypeScript
29 lines
909 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('app dir - dynamic error trace', () => {
|
|
const { next, skipped } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
if (skipped) return
|
|
|
|
it('should show the error trace', async () => {
|
|
const browser = await next.browser('/')
|
|
|
|
// TODO(veil): Where is the stackframe for app/page.js?
|
|
await expect(browser).toDisplayRedbox(`
|
|
{
|
|
"code": "E828",
|
|
"description": "Route / with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
|
|
"environmentLabel": "Server",
|
|
"label": "Runtime Error",
|
|
"source": "app/lib.js (4:13) @ Foo
|
|
> 4 | useHeaders()
|
|
| ^",
|
|
"stack": [
|
|
"Foo app/lib.js (4:13)",
|
|
],
|
|
}
|
|
`)
|
|
})
|
|
})
|