Repository navigation
test: organize Bitwarden account mapping cases without changing discovery - #1594
Merged
Merged
Conversation
Pass only the suite-local helpers to the account case modules, import vitest, production and fixture values in the modules, share the module contexts through context.ts, rename the binding admission and same-account URI modules, and drop the misplaced docs section ahead of its rewrite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011PUTx3w1HVYZp73fQasU3g
…ings 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 was referenced Nov 12, 2026
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 #1586 and keeps its commit, plus review fixes.
Summary
packages/bitwarden/src/account.test.tskeeps the shared mapper, transport and local-crypto session helpers, the session cleanup hook, the five describe scopes and the native local-crypto cases. Synchronous registrar modules inpackages/bitwarden/test/account/hold the provider binding admission, strict modern metadata, received-envelope item mapping and same-account URI context cases.account.test.tsmax-lines exemption is removed from.oxlintrc.json.Review fixes on top of #1586
vitest, the production exports (createBitwardenAccountMapper,admitPreparedBitwardenAccount) and the fixture values they use directly. Only the suite-local helpers (bootstrap,known,setAt,authenticated,mapper,mapRaw,expectLeftOut,received,rawWithCollection) go through the context. The six entry imports that were only kept alive by being passed along are gone.AccountTestContextis replaced byAccountTestFixtures, placed next to the helpers, andtest/account/context.tsholds the four module contexts, replacing the field lists each module wrote twice.account-admission-cases.tstobinding-admission-cases.ts(it covers provider binding admission, notadmitPreparedBitwardenAccount) anduri-context-cases.tstosame-account-uri-cases.ts.connection-fixtures.test.tsandlocal-unlock.test.tsas other entries that exercise the mapper, names the shared types, and says the modules are not discovered..oxlintrc.jsonconflict with test: organize local crypto cases without changing discovery #1593 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/account.test.ts: 155, 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