mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #319] [MERGED] test: add unit tests for next/document shim #475
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#475
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/319
Author: @NathanDrake2406
Created: 3/7/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @james-elicx
Base:
main← Head:test/document-shim-coverage📝 Commits (1)
5d79dc1test: add unit tests for next/document shim components📊 Changes
1 file changed (+101 additions, -0 deletions)
View changed files
➕
tests/document.test.ts(+101 -0)📄 Description
Summary
next/documentshim components (Main,NextScript,Head, defaultDocument)Mainrendersid="__next"with__NEXT_MAIN__placeholder (dev-server replaces with page content)NextScriptrenders<!-- __NEXT_SCRIPTS__ -->comment (dev-server replaces with hydration scripts)Headinjects default charset + viewport meta, preserves custom childrenDocumentassembles all sub-components in the correct nesting order (head < body < main < scripts)Test plan
npx vitest run tests/document.test.ts— 5/5 passing🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.