mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #345] [MERGED] test: add snapshot tests for entry template generators #496
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#496
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/345
Author: @yunus25jmi1
Created: 3/8/2026
Status: ✅ Merged
Merged: 3/8/2026
Merged by: @james-elicx
Base:
main← Head:test/entry-template-snapshots📝 Commits (10+)
1d6c140test: add snapshot tests for entry template generators417323aMerge remote-tracking branch 'origin/main' into test/entry-template-snapshotsc706467test: update entry template snapshots after merging main0f38e0ftest: address bonk review comments on entry-template snapshot testsef3a5e6Merge remote-tracking branch 'origin/main' into test/entry-template-snapshots44a2256test: address new bonk review comments on entry-template snapshot testsad716e5test: address final bonk review comments03b694dMerge remote-tracking branch 'upstream/main' into test/entry-template-snapshots08c8799test: update snapshots after merge with main0926176test: add metadata routes test, enrich route fixture with loading/error/template/notFound📊 Changes
2 files changed (+17435 additions, -0 deletions)
View changed files
➕
tests/__snapshots__/entry-templates.test.ts.snap(+17146 -0)➕
tests/entry-templates.test.ts(+289 -0)📄 Description
Summary
Add snapshot tests for all 5 virtual entry module generators as a prerequisite for the incremental extraction in #253.
Per @james-elicx's feedback on #259: get snapshot tests in first, then perform each extraction separately so we have strong regression confidence.
Tests added (10 snapshots)
App Router (functions already exported from
app-dev-server.ts):generateRscEntry— minimal routes, with middleware, with config, with instrumentation, with global error, with metadata routesgenerateSsrEntrygenerateBrowserEntryPages Router (closures inside the plugin, tested via
pluginContainer.load()):virtual:vinext-server-entryvirtual:vinext-client-entryRoute fixture coverage
The
minimalAppRoutesfixture includes:/,/about,/dashboard)/blog/:slugwithisDynamic: true, params: ["slug"])/dashboard) withloadingPath,errorPath,layoutErrorPaths,notFoundPath,notFoundPaths,templatesVerification
Addresses #253
Supersedes #259 (will be broken into incremental PRs after this lands)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.