Skip to content

test: cover lazy errorComponent behavior across frameworks#7068

Merged
beaussan merged 1 commit intomainfrom
opencode/curious-lagoon
Mar 29, 2026
Merged

test: cover lazy errorComponent behavior across frameworks#7068
beaussan merged 1 commit intomainfrom
opencode/curious-lagoon

Conversation

@beaussan
Copy link
Copy Markdown
Contributor

@beaussan beaussan commented Mar 29, 2026

Summary

  • add lazy errorComponent coverage for beforeLoad/loader failures in React and Solid error-component tests
  • include the same lazy error-component matrix in Vue tests to match framework parity added after PR feat: support lazy error component on beforeLoad failures #5568
  • keep scope test-only: the bug was fixed since then

Impact

  • improves regression coverage for lazy error-boundary behavior without changing runtime behavior, that is critical for monorepo setup
  • increases confidence that framework adapters (React/Solid/Vue) handle lazy errorComponent consistently
  • low risk: changes are isolated to test files and assertions

Summary by CodeRabbit

  • Tests
    • Expanded error component test coverage across React Router, Solid Router, and Vue Router packages to validate error component rendering with both eager and lazy-loading patterns, ensuring consistent behavior regardless of initialization method.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c7e83c2-bca1-4eb6-a9af-dba8a92eb3e9

📥 Commits

Reviewing files that changed from the base of the PR and between 9368c5f and bd91e71.

📒 Files selected for processing (3)
  • packages/react-router/tests/errorComponent.test.tsx
  • packages/solid-router/tests/errorComponent.test.tsx
  • packages/vue-router/tests/errorComponent.test.tsx

📝 Walkthrough

Walkthrough

Three router packages' error component test suites are refactored to introduce a new test matrix dimension (isUsingLazyError). When enabled, errorComponent is moved from direct route definitions to lazy route factories created via createLazyRoute. Non-lazy configurations retain original behavior.

Changes

Cohort / File(s) Summary
Error Component Tests – Lazy Configuration Matrix
packages/react-router/tests/errorComponent.test.tsx, packages/solid-router/tests/errorComponent.test.tsx, packages/vue-router/tests/errorComponent.test.tsx
Added isUsingLazyError test matrix to cover both lazy and non-lazy error component configurations. When lazy, errorComponent is supplied via .lazy(createLazyRoute(...)) factories; when non-lazy, it remains on route definitions directly. Existing navigation and rendering assertions preserved across both configurations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 With lazy routes now in our test,
Error components pass each quest,
Two paths—both eager and deferred—
All covered by our fluffy word!
~Hoppy Review Rabbit 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding test coverage for lazy errorComponent behavior across the React, Solid, and Vue router frameworks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch opencode/curious-lagoon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 29, 2026

View your CI Pipeline Execution ↗ for commit bd91e71

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 9m 9s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1m 44s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-29 10:48:57 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: 9368c5f3bfc9
  • Measured at: 2026-03-29T10:40:38.657Z
  • Baseline source: history:6ee0e795b085
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 87.47 KiB 0 B (0.00%) 275.67 KiB 75.99 KiB █▇▇▃▃▂▂▂▂▁▁
react-router.full 90.76 KiB 0 B (0.00%) 286.86 KiB 78.96 KiB █▇▇▃▃▂▂▂▂▁▁
solid-router.minimal 35.51 KiB 0 B (0.00%) 107.04 KiB 31.90 KiB █▅▅▅▅▂▂▂▂▁▁
solid-router.full 39.98 KiB 0 B (0.00%) 120.57 KiB 35.84 KiB █▄▄▄▄▃▃▃▃▁▁
vue-router.minimal 53.36 KiB 0 B (0.00%) 152.97 KiB 47.91 KiB ███▂▂▂▂▂▂▁▁
vue-router.full 58.22 KiB 0 B (0.00%) 168.43 KiB 52.08 KiB ███▃▃▂▂▂▂▁▁
react-start.minimal 101.99 KiB 0 B (0.00%) 323.91 KiB 88.19 KiB █▆▆▂▂▂▂▂▂▁▁
react-start.full 105.36 KiB 0 B (0.00%) 334.26 KiB 91.00 KiB █▇▇▂▂▂▂▂▂▁▁
solid-start.minimal 49.61 KiB 0 B (0.00%) 153.29 KiB 43.69 KiB █▅▅▅▅▂▂▂▂▁▁
solid-start.full 55.10 KiB 0 B (0.00%) 169.52 KiB 48.41 KiB █▄▄▄▄▃▃▃▃▁▁

Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 29, 2026

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7068

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7068

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7068

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7068

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7068

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7068

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7068

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7068

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7068

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7068

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7068

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7068

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7068

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7068

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7068

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7068

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7068

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7068

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7068

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7068

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7068

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7068

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7068

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7068

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7068

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7068

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7068

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7068

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7068

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7068

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7068

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7068

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7068

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7068

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7068

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7068

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7068

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7068

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7068

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7068

commit: bd91e71

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 29, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing opencode/curious-lagoon (bd91e71) with main (6ee0e79)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (9368c5f) during the generation of this report, so 6ee0e79 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@beaussan beaussan marked this pull request as ready for review March 29, 2026 15:57
@beaussan beaussan merged commit 7b9faae into main Mar 29, 2026
17 checks passed
@beaussan beaussan deleted the opencode/curious-lagoon branch March 29, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants