Difficulty: Intermediate
Type: test
Background
The README documents strict parameter validation for deep links: guild-detail links require a valid guildId, access-check links require both guildId and resourceId, walletAddress is optional, and invalid/malformed links should redirect to a user-friendly error screen.
Problem
There's no indication this deep-link parameter validation logic has dedicated unit tests, which is risky since Expo Router's file-based routing combined with custom-scheme and universal-link parsing has several edge cases (missing params, extra params, malformed URLs) that are easy to regress.
Expected outcome
The deep-link parsing/validation logic has unit tests for: valid guild-detail link, guild-detail link missing guildId, valid access-check link (with and without optional walletAddress), access-check link missing resourceId, and a fully malformed URL — each asserting the correct outcome (successful navigation params vs. redirect to the error screen).
Suggested implementation
- Locate the deep-link parsing logic (likely in
app/ layout files or a dedicated src/ module) and add a test file under tests/ covering the matrix above.
- Use fixture URLs for both the custom scheme (
guildpass://...) and universal link (https://guildpass.xyz/...) forms to ensure both are parsed identically.
- Assert that invalid cases route to the documented user-friendly error screen rather than crashing or silently no-op-ing.
Acceptance criteria
Likely affected files/directories
app/ (routing/layout deep-link handling)
src/
tests/
Difficulty: Intermediate
Type: test
Background
The README documents strict parameter validation for deep links: guild-detail links require a valid
guildId, access-check links require bothguildIdandresourceId,walletAddressis optional, and invalid/malformed links should redirect to a user-friendly error screen.Problem
There's no indication this deep-link parameter validation logic has dedicated unit tests, which is risky since Expo Router's file-based routing combined with custom-scheme and universal-link parsing has several edge cases (missing params, extra params, malformed URLs) that are easy to regress.
Expected outcome
The deep-link parsing/validation logic has unit tests for: valid guild-detail link, guild-detail link missing
guildId, valid access-check link (with and without optionalwalletAddress), access-check link missingresourceId, and a fully malformed URL — each asserting the correct outcome (successful navigation params vs. redirect to the error screen).Suggested implementation
app/layout files or a dedicatedsrc/module) and add a test file undertests/covering the matrix above.guildpass://...) and universal link (https://guildpass.xyz/...) forms to ensure both are parsed identically.Acceptance criteria
walletAddressabsence doesn't break access-check link handlingpnpm test:runpassesLikely affected files/directories
app/(routing/layout deep-link handling)src/tests/