Commit a1d98a72 authored by devjiwonchoi's avatar devjiwonchoi

Update test to be Cache Components compatible

parent 24b79b2b
export const revalidate = 0 import { Suspense } from 'react'
import { connection } from 'next/server'
export default function Page() {
return (
<Suspense>
<PageImpl />
</Suspense>
)
}
let hasThrown = false let hasThrown = false
export default function Page() { async function PageImpl() {
// Throw only during the runtime
await connection()
if (!hasThrown) { if (!hasThrown) {
hasThrown = true hasThrown = true
throw new Error('this is a test') throw new Error('this is a test')
......
...@@ -278,7 +278,7 @@ describe('app-dir - errors', () => { ...@@ -278,7 +278,7 @@ describe('app-dir - errors', () => {
"at LoadingBoundary", "at LoadingBoundary",
"at ErrorBoundaryHandler", "at ErrorBoundaryHandler",
"at ErrorBoundary", "at ErrorBoundary",
"at InnerScrollAndFocusHandler", "at InnerScrollAndFocusHandlerOld",
"at ScrollAndFocusHandler", "at ScrollAndFocusHandler",
"at RenderFromTemplateContext", "at RenderFromTemplateContext",
"at SegmentStateProvider", "at SegmentStateProvider",
...@@ -290,7 +290,7 @@ describe('app-dir - errors', () => { ...@@ -290,7 +290,7 @@ describe('app-dir - errors', () => {
"at HTTPAccessFallbackBoundary", "at HTTPAccessFallbackBoundary",
"at LoadingBoundary", "at LoadingBoundary",
"at ErrorBoundary", "at ErrorBoundary",
"at InnerScrollAndFocusHandler", "at InnerScrollAndFocusHandlerOld",
"at ScrollAndFocusHandler", "at ScrollAndFocusHandler",
"at RenderFromTemplateContext", "at RenderFromTemplateContext",
"at SegmentStateProvider", "at SegmentStateProvider",
......
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