Unverified Commit b400f8ec authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[test] Use new Redbox matchers in app/ dynamic-error (#76744)

parent d4919b31
......@@ -29,11 +29,21 @@ describe('dynamic = "error" in devmode', () => {
]),
'/server'
)
const { session } = sandbox
await session.assertHasRedbox()
const description = await session.getRedboxDescription()
expect(description).toMatchInlineSnapshot(
`"Error: Route /server with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering"`
)
const { browser } = sandbox
await expect(browser).toDisplayRedbox(`
{
"count": 1,
"description": "Error: Route /server with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"environmentLabel": "Server",
"label": "Unhandled Runtime Error",
"source": "app/server/page.js (4:16) @ Page
> 4 | await cookies()
| ^",
"stack": [
"Page app/server/page.js (4:16)",
],
}
`)
})
})
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