Skip to content

test(router-core): add missing test cleanup in 3920 - #8023

Merged
Sheraff merged 1 commit into
mainfrom
test-router-core-missing-cleanup-3920
Aug 9, 2026
Merged

test(router-core): add missing test cleanup in 3920#8023
Sheraff merged 1 commit into
mainfrom
test-router-core-missing-cleanup-3920

Conversation

@Sheraff

@Sheraff Sheraff commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Tests
    • Improved test cleanup for navigation event subscriptions.
    • Preserved existing assertions for navigation paths and initial redirects.

@nx-cloud

nx-cloud Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit bb6b928

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

☁️ Nx Cloud last updated this comment at 2026-08-09 21:31:23 UTC

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

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

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a26be461-37aa-424c-b33e-20be04d5646c

📥 Commits

Reviewing files that changed from the base of the PR and between 91a848e and bb6b928.

📒 Files selected for processing (1)
  • packages/router-core/tests/issue-3920-on-before-navigate-after-initial-redirect.test.ts

📝 Walkthrough

Walkthrough

The navigation test now registers its onBeforeNavigate unsubscribe function with Vitest’s onTestFinished. The existing navigation callback and assertion remain unchanged.

Changes

Navigation test cleanup

Layer / File(s) Summary
Register subscription cleanup
packages/router-core/tests/issue-3920-on-before-navigate-after-initial-redirect.test.ts
The test imports onTestFinished, stores the onBeforeNavigate unsubscribe function, and registers it for automatic cleanup.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the router-core test and the missing cleanup added for issue 3920.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 test-router-core-missing-cleanup-3920

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.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

This pull request does not affect bundle size in any measured scenario.

@pkg-pr-new

pkg-pr-new Bot commented Aug 9, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8023

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-rsc

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: bb6b928

@codspeed-hq

codspeed-hq Bot commented Aug 9, 2026

Copy link
Copy Markdown

Merging this PR will regress 0 benchmarks

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 7 improved benchmarks
❌ 2 (👁 2) regressed benchmarks
✅ 171 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory mem server error-paths not-found (solid) 658 KB 415.5 KB +58.38%
Memory mem client navigation-churn (solid) 665.6 KB 598.5 KB +11.21%
Simulation client-history navigation loop (react) 40 ms 37.2 ms +7.6%
Memory mem client unique-location-churn (vue) 1.3 MB 1.2 MB +5.21%
Simulation ssr server-fn during document ssr (vue) 206.9 ms 197.4 ms +4.83%
Memory mem server error-paths redirect (solid) 288.7 KB 278.3 KB +3.71%
Memory mem server error-paths not-found (vue) 328.9 KB 318.9 KB +3.15%
👁 Memory mem server error-paths unmatched (react) 272.1 KB 487.8 KB -44.22%
👁 Memory mem server server-fn-churn (react) 265 KB 275.6 KB -3.84%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing test-router-core-missing-cleanup-3920 (bb6b928) with main (91a848e)

Open in CodSpeed

@Sheraff
Sheraff merged commit af8dcb8 into main Aug 9, 2026
26 checks passed
@Sheraff
Sheraff deleted the test-router-core-missing-cleanup-3920 branch August 9, 2026 21:43
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.

1 participant