Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Nov 20, 2025

No description provided.

@webJose webJose requested a review from Copilot November 20, 2025 00:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for implicit multi-hash routing (IMHR) to the unit testing framework. Previously, the test suite covered five routing universes (implicit path, path, implicit hash, hash, and multi-hash), but lacked coverage for the scenario where multi-hash routing is enabled implicitly via defaultHash.

Key changes:

  • Added new "Implicit Multi-Hash Routing" (IMHR) test universe alongside existing routing modes
  • Updated test logic across multiple files to handle the new IMHR universe correctly
  • Standardized hash identifier from 'p1' to 'tp' throughout test suite

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/testing/test-utils.ts Added IMHR universe definition and made all RoutingUniverse properties optional to support various routing configurations
src/lib/kernel/resolveHashValue.test.ts Updated hash identifier from 'p1' to 'tp'
src/lib/kernel/calculateState.test.ts Added handling for implicit multi-hash routing when defaultHash is a string, updated universe identifier from 'IMP' to 'IPR'
src/lib/kernel/calculateHref.test.ts Added IMHR-specific logic throughout tests to properly construct and verify multi-hash URLs
src/lib/kernel/RouterEngine.svelte.test.ts Extended state expectation logic to handle IMHR universe with string defaultHash values
src/lib/kernel/LocationFull.test.ts Updated hash identifier from 'p1' to 'tp'
src/lib/Route/Route.svelte.test.ts Replaced boolean hash checking with comprehensive URL construction logic supporting all routing modes including IMHR

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@webJose webJose merged commit 504d97f into main Nov 20, 2025
1 check passed
@webJose webJose deleted the JP/tests branch November 20, 2025 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants