Overview
The React Navigation deep link configuration parses custom URL schemes (teachlink://) but there are no tests for malformed, missing-parameter, or malicious URL inputs. A crafted URL could navigate the user to unintended screens.
Specifications
Features:
- Write unit tests for valid deep links, missing parameters, extra parameters, and encoded/malicious URLs
- Verify that unknown routes fall back to a safe default screen
Tasks:
- Create
__tests__/linkingConfig.test.ts
- Add test cases for: valid URL, missing token, XSS-in-URL, unknown route
- Assert navigation output for each case
Impacted Files:
src/navigation/linkingConfig.ts
__tests__/linkingConfig.test.ts (new)
Acceptance Criteria
- All test cases pass
- Malicious URLs do not navigate to unintended screens
- Unknown routes fall back to the home screen
Overview
The React Navigation deep link configuration parses custom URL schemes (
teachlink://) but there are no tests for malformed, missing-parameter, or malicious URL inputs. A crafted URL could navigate the user to unintended screens.Specifications
Features:
Tasks:
__tests__/linkingConfig.test.tsImpacted Files:
src/navigation/linkingConfig.ts__tests__/linkingConfig.test.ts(new)Acceptance Criteria