Skip to content

Commit

Permalink
Add and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Sep 4, 2024
1 parent 83574ea commit a636d73
Show file tree
Hide file tree
Showing 11 changed files with 326 additions and 147 deletions.
2 changes: 0 additions & 2 deletions packages/next/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,6 @@ export class NextScript extends React.Component<OriginProps> {
data-ampdevmode
/>
))}
{/* TODO: Do we need to render the meta tags here too? */}
</>
)
}
Expand Down Expand Up @@ -1130,7 +1129,6 @@ export class NextScript extends React.Component<OriginProps> {
!disableRuntimeJS &&
this.getDynamicChunks(files)}
{disableOptimizedLoading && !disableRuntimeJS && this.getScripts(files)}
{/* TODO: Do we need to render the meta tags here too? */}
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ export default function StaticPage() {
return (
<>
<h1 id="static-page-header">Static Page</h1>
<Link href="/dynamic-page" id="go-to-dynamic-page">
<Link href="/app-router/dynamic-page" id="go-to-dynamic-page">
Go to dynamic page
</Link>
<Link href="/static-page-2" id="go-to-static-page">
<Link href="/app-router/static-page-2" id="go-to-static-page">
Go to static page
</Link>
</>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function register() {
setter.set(
carrier,
'my-parent-span-id',
trace.getSpanContext(context).spanId
trace.getSpanContext(context)?.spanId ?? 'invariant'
)
},
extract(context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function DynamicPage() {
return <h1 id="dynamic-page-header">Dynamic Page</h1>
}

export async function getServerSideProps() {
return { props: {} }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function StaticPage() {
return <h1 id="static-page-2-header">Static Page 2</h1>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Link from 'next/link'

export default function StaticPage() {
return (
<>
<h1 id="static-page-header">Static Page</h1>
<Link href="/pages-router/dynamic-page" id="go-to-dynamic-page">
Go to dynamic page
</Link>
<Link href="/pages-router/static-page-2" id="go-to-static-page">
Go to static page
</Link>
</>
)
}

0 comments on commit a636d73

Please sign in to comment.