test: use metadata API in app-basic root layout#316
Merged
james-elicx merged 1 commit intocloudflare:mainfrom Mar 7, 2026
Merged
Conversation
commit: |
Collaborator
|
/bigbonk review |
Contributor
There was a problem hiding this comment.
Clean fix. The root cause analysis is correct: the duplicate <title> was from the hardcoded JSX in the root layout conflicting with the Metadata API output, not a Suspense streaming bug.
I verified:
tests/app-router.test.ts:120asserts<title>App Basic</title>— still passes because the Metadata API renders the same title.- The removed
<meta charSet>and<meta name="viewport">were redundant — vinext (matching Next.js behavior) auto-injects charset and viewport defaults when using the Metadata API. - The suspense test fixture (
metadata-suspense-test/page.tsx) exportstitle: "Suspense Metadata Title", which properly overrides the root layout's"App Basic"through metadata merging — so the single<title>assertion is correct.
Good to have this test running instead of skipped.
Contributor
|
Approved the PR. The change is straightforward and correct:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<head>markup to the Metadata APIWhy
The duplicate
<title>was coming from the shared test fixture root layout hardcoding<title>App Basic</title>, not from Suspense-specific metadata streaming.Testing
pnpm test tests/nextjs-compat/metadata-suspense.test.ts tests/nextjs-compat/metadata.test.ts