Repository navigation
test: organize Bitwarden URI matching cases without changing discovery - #1597
Merged
Merged
Conversation
Pass only the shared target and result helpers to the URI case modules, import vitest, production and fixture values in the modules, give each registrar its own *-cases.ts module with contexts in context.ts, and drop the docs section ahead of its rewrite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011PUTx3w1HVYZp73fQasU3g
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011PUTx3w1HVYZp73fQasU3g
# Conflicts: # .oxlintrc.json # docs/development.md
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.
Replaces #1587 and keeps its commit, plus review fixes.
Summary
packages/bitwarden/src/uri.test.tskeeps the seven describe scopes and the sharedtarget,saved,emptyResultanduserDomainshelpers. Synchronous registrar modules inpackages/bitwarden/test/uri/hold the ordinary semantics, equivalent domain, retained context, strict admission, caller-answered Regex, destination grant and authenticated SDK cases.uri.test.tsmax-lines exemption is removed from.oxlintrc.json(the largest module is 462 lines).Review fixes on top of #1587
bindingsobject, which passedvitest, thesdknamespace, production exports and fixture values to every module, is gone. The modules import those directly, and the entry passes each registrar only the shared helpers it uses. The two registrars that use none take no argument.UriTestFixturesfor the four helpers, andtest/uri/context.tsbuilds the module contexts from it. TheUriMatchContextre-export is gone; the Regex module importsBitwardenUriMatchContextfromsrc/uri.*-cases.tsmodule (ordinary-semantics-cases.ts,equivalent-domain-cases.ts,retained-context-cases.ts,strict-admission-cases.ts,regex-answer-cases.ts,destination-grant-cases.ts,authenticated-sdk-cases.ts), soregex.tsandintegration.tsno longer read like production files or a test tier..oxlintrc.jsonconflict with test: organize Bitwarden account mapping cases without changing discovery #1594 is resolved by dropping both removed lines, and the docs conflict by keeping every main section and adding this one before "Login wire contracts".Verification
src/uri.test.ts: 207, identical to main and all passing.oxfmt --check,oxlint packages/bitwarden,rumdl check docs/development.md,mise run //packages/bitwarden:typecheckpass.Generated by Claude Code