Skip to content

test: organize Bitwarden account mapping cases without changing discovery - #1594

Merged
risu729 merged 5 commits into
mainfrom
claude/project-thread-ei232v
Nov 12, 2026
Merged

risu729 merged 5 commits into
mainfrom
claude/project-thread-ei232v

Conversation

@risu729

@risu729 risu729 commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Replaces #1586 and keeps its commit, plus review fixes.

Summary

  • packages/bitwarden/src/account.test.ts keeps 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 in packages/bitwarden/test/account/ hold the provider binding admission, strict modern metadata, received-envelope item mapping and same-account URI context cases.
  • The account.test.ts max-lines exemption is removed from .oxlintrc.json.

Review fixes on top of #1586

  • The modules now import 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.
  • AccountTestContext is replaced by AccountTestFixtures, placed next to the helpers, and test/account/context.ts holds the four module contexts, replacing the field lists each module wrote twice.
  • Renamed account-admission-cases.ts to binding-admission-cases.ts (it covers provider binding admission, not admitPreparedBitwardenAccount) and uri-context-cases.ts to same-account-uri-cases.ts.
  • The docs section now sits after the sibling test organization sections, describes the layout rather than the change, names connection-fixtures.test.ts and local-unlock.test.ts as other entries that exercise the mapper, names the shared types, and says the modules are not discovered.
  • Merged main. The .oxlintrc.json conflict 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

  • Vitest JSON reporter test IDs for 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:typecheck pass.

Generated by Claude Code

risu729 and others added 5 commits November 12, 2026 22:49
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
# Conflicts:
#	.oxlintrc.json
#	docs/development.md
@risu729 risu729 self-assigned this Nov 12, 2026
@risu729
risu729 merged commit 06a2e25 into main Nov 12, 2026
14 checks passed
@risu729
risu729 deleted the claude/project-thread-ei232v branch November 12, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants