Skip to content

test: organize local crypto cases without changing discovery - #1593

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 #1584 and keeps its commit, plus review fixes.

Summary

  • packages/bitwarden/src/local-crypto.test.ts keeps the synthetic account and SDK helpers, the shared sessions array, the root afterEach and the three describe scopes. Synchronous registrar modules in packages/bitwarden/test/local-crypto/ hold the account initialization, cipher isolation and item repair cases.
  • The local-crypto.test.ts max-lines exemption is removed from .oxlintrc.json (the largest file is 704 lines).

Review fixes on top of #1584

  • cipher-isolation.ts imports bitwardenTotpSecret from __fixtures__/totp directly, like its other fixtures, instead of receiving it through the context. The entry drops that import and field.
  • Added test/local-crypto/context.ts with AccountInitializationContext, CipherIsolationContext and ItemRepairContext, replacing the hand-written Pick lists in each module.
  • The docs section now sits after the sibling test organization sections and describes the layout rather than the change. It names LocalCryptoTestFixtures and context.ts, says the modules are not discovered as test files, and drops the dependency-order rationale, since __fixtures__/totp only exports constants.
  • Merged main; the docs conflict is resolved by keeping every main section and adding this one before "Login wire contracts".

Verification

  • Vitest JSON reporter test IDs for src/local-crypto.test.ts: 126, identical to main and all passing.
  • Inlining the registrars back gives the main file, apart from the moved imports and the exported type.
  • 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:40
Import the TOTP secret directly like the other fixtures, share the
module contexts through context.ts, 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
@risu729 risu729 self-assigned this Nov 12, 2026
@risu729
risu729 merged commit e3bede0 into main Nov 12, 2026
14 checks passed
@risu729
risu729 deleted the claude/project-thread-ei232v branch November 12, 2026 14:13
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