Skip to content

Commit

Permalink
diff test snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 18, 2024
1 parent 44f545f commit 93bba33
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion test/development/app-dir/stitching-errors/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const nextConfig = {
experimental: {
// reactOwnerStack: true,
reactOwnerStack: true,
},
}

Expand Down
44 changes: 22 additions & 22 deletions test/development/app-dir/stitching-errors/stitching-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ describe('stitching errors', () => {
} else {
expect(stackFramesContent).toMatchInlineSnapshot(`
"useThrowError @ app/browser/uncaught/page.js
useErrorHook @ app/browser/uncaught/page.js"
useErrorHook @ app/browser/uncaught/page.js
ReactDevOverlay @ ../src/client/components/react-dev-overlay/app/hot-reloader-client.tsx
assetPrefix @ ../src/client/components/app-router.tsx
actionQueue @ ../src/client/components/app-router.tsx
AppRouter @ ../src/client/app-index.tsx"
`)
}

Expand All @@ -68,10 +72,7 @@ describe('stitching errors', () => {

if (process.env.TURBOPACK) {
expect(normalizeStackTrace(errorLog)).toMatchInlineSnapshot(`
"%o
%s
%s
Error: browser error
"Error: browser error
at useThrowError
at useErrorHook
at Page
Expand All @@ -85,14 +86,12 @@ describe('stitching errors', () => {
at renderRootSync
at performWorkOnRoot
at performWorkOnRootViaSchedulerTask
at MessagePort.performWorkUntilDeadline The above error occurred in the <NotFoundErrorBoundary> component. React will try to recreate this component tree from scratch using the error boundary you provided, ReactDevOverlay."
at MessagePort.performWorkUntilDeadline
The above error occurred in the <Page> component. It was handled by the <ReactDevOverlay> error boundary."
`)
} else {
expect(normalizeStackTrace(errorLog)).toMatchInlineSnapshot(`
"%o
%s
%s
Error: browser error
"Error: browser error
at useThrowError
at useErrorHook
at Page
Expand All @@ -106,7 +105,8 @@ describe('stitching errors', () => {
at renderRootSync
at performWorkOnRoot
at performWorkOnRootViaSchedulerTask
at MessagePort.performWorkUntilDeadline The above error occurred in the <NotFoundErrorBoundary> component. React will try to recreate this component tree from scratch using the error boundary you provided, ReactDevOverlay."
at MessagePort.performWorkUntilDeadline
The above error occurred in the <Page> component. It was handled by the <ReactDevOverlay> error boundary."
`)
}
})
Expand All @@ -122,10 +122,7 @@ describe('stitching errors', () => {
}).message

expect(normalizeStackTrace(errorLog)).toMatchInlineSnapshot(`
"%o
%s
%s
Error: browser error
"Error: browser error
at useThrowError
at useErrorHook
at Thrower
Expand All @@ -139,7 +136,8 @@ describe('stitching errors', () => {
at renderRootSync
at performWorkOnRoot
at performWorkOnRootViaSchedulerTask
at MessagePort.performWorkUntilDeadline The above error occurred in the <Thrower> component. React will try to recreate this component tree from scratch using the error boundary you provided, MyErrorBoundary."
at MessagePort.performWorkUntilDeadline
The above error occurred in the <Thrower> component. It was handled by the <MyErrorBoundary> error boundary."
`)
})

Expand All @@ -157,7 +155,11 @@ describe('stitching errors', () => {
} else {
expect(stackFramesContent).toMatchInlineSnapshot(`
"useThrowError @ app/ssr/page.js
useErrorHook @ app/ssr/page.js"
useErrorHook @ app/ssr/page.js
ReactDevOverlay @ ../src/client/components/react-dev-overlay/app/hot-reloader-client.tsx
assetPrefix @ ../src/client/components/app-router.tsx
actionQueue @ ../src/client/components/app-router.tsx
AppRouter @ ../src/client/app-index.tsx"
`)
}

Expand All @@ -167,10 +169,7 @@ describe('stitching errors', () => {
}).message

expect(normalizeStackTrace(errorLog)).toMatchInlineSnapshot(`
"%o
%s
%s
Error: ssr error
"Error: ssr error
at useThrowError
at useErrorHook
at Page
Expand All @@ -184,7 +183,8 @@ describe('stitching errors', () => {
at renderRootSync
at performWorkOnRoot
at performWorkOnRootViaSchedulerTask
at MessagePort.performWorkUntilDeadline The above error occurred in the <NotFoundErrorBoundary> component. React will try to recreate this component tree from scratch using the error boundary you provided, ReactDevOverlay."
at MessagePort.performWorkUntilDeadline
The above error occurred in the <Page> component. It was handled by the <ReactDevOverlay> error boundary."
`)
})
})

0 comments on commit 93bba33

Please sign in to comment.