Repository navigation
test(web): drop the unjustified double cast in storage-browser.test.ts - #2584
Merged
Merged
Conversation
The partial token fixture is a subset of OAuthTokens, so a single 'as OAuthTokens' type-checks; the 'as unknown as' carried no reason. Closes #2538 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The narrow, type-only change satisfies the linked issue and introduces no blocking concerns.
Review effort: Balanced
Findings: None
What changed in this PR
Simplifies a web OAuth test fixture’s type assertion, resolving #2538 without changing runtime behavior.
Changes:
- Replaces
as unknown as OAuthTokenswith a singleas OAuthTokens.
| File | Description |
|---|---|
| clients/web/src/test/core/auth/storage-browser.test.ts | Removes the unnecessary double assertion from the partial token fixture. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
Copilot review loop closed: round 1 came back clean (no inline comments, "Findings: None", no suppressed comments), which is a stop condition. No further rounds requested. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2538
Replaces the unjustified
as unknown as OAuthTokenson the partial token fixture inclients/web/src/test/core/auth/storage-browser.test.tswith a singleas OAuthTokens. The literal (refresh_token+token_type) is a subset ofOAuthTokens, so the single cast type-checks and no justification comment is needed.Verification
tsc -p tsconfig.test.json --noEmit(web) is clean, andstorage-browser.test.tspasses (42/42).npm run local:gate: every stage was green except the webintegrationproject, where 19 tests in 3 files failed for sandbox reasons unrelated to this diff:transport.test.ts/server-extra-coverage.test.tsfail withProxy response (502) ... HTTP Tunneling. The sandbox exportsHTTP_PROXY, and with the proxy variables unset all 18 pass.secret-store-selection.test.ts(isOnMountPoint> "is false when the path itself can't be resolved") fails because the sandbox's cwd is a bind mount, so the lexical walk to.correctly lands on a mount point.🤖 Generated with Claude Code