Skip to content

[Repo Assist] test(shared): add DeepLinkParser unit tests - #456

Merged
shanselman merged 1 commit into
masterfrom
repo-assist/improve-deeplink-parser-tests-15ed34c432b39e5d
May 21, 2026
Merged

[Repo Assist] test(shared): add DeepLinkParser unit tests#456
shanselman merged 1 commit into
masterfrom
repo-assist/improve-deeplink-parser-tests-15ed34c432b39e5d

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

DeepLinkParser had no test coverage despite being pure, testable logic (no I/O, no Windows dependencies). This adds 27 tests covering the full public API.

What's tested

Area Cases
ParseDeepLink — null/whitespace/wrong scheme → returns null
ParseDeepLink — path extraction with/without trailing slash, nested paths
ParseDeepLink — Windows-canonicalized form openclaw://send/?text=hello → path "send"
ParseDeepLink — query string and parameters single, multiple, empty
ParseDeepLink — parameter lookup case-insensitive (Dictionary is OrdinalIgnoreCase)
ParseDeepLink — URL decoding %20 → space, %2B+
GetQueryParam — null/empty inputs → returns null
GetQueryParam — value retrieval matching, missing, case-insensitive, URL-decoded

Test Status

Passed! - Failed: 0, Passed: 27, Skipped: 0, Total: 27 - DeepLinkParser filter

Full suite: 1796 passed, 7 pre-existing failures (Windows-path tests on Linux CI), 28 skipped — same baseline as before this PR.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

DeepLinkParser had no test coverage despite being pure testable logic
(no I/O, no Windows dependencies). This adds 27 tests covering:

- ParseDeepLink: null/whitespace/wrong-scheme → null
- ParseDeepLink: path extraction (with/without trailing slash)
- ParseDeepLink: Windows-canonicalized form (slash before query)
- ParseDeepLink: single and multi-parameter extraction
- ParseDeepLink: case-insensitive parameter lookup
- ParseDeepLink: URL-encoded value decoding
- ParseDeepLink: empty query → empty Parameters dict
- GetQueryParam: null/empty query or empty key → null
- GetQueryParam: value retrieval, case-insensitivity, URL decoding

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shanselman
shanselman marked this pull request as ready for review May 21, 2026 20:34
@shanselman
shanselman merged commit eeab616 into master May 21, 2026
7 checks passed
@shanselman
shanselman deleted the repo-assist/improve-deeplink-parser-tests-15ed34c432b39e5d branch May 21, 2026 20:34
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